We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Friendly Category Names in URL

Development and Programming

davenport's avatar
davenport
67 posts
17 years ago
davenport's avatar davenport

i have a site with 6 sections, each sub sections has a index page for subnavigation of that section.

about 2 separate weblogs (for custom fields) and other static “pages” make up each sub section.

i want the structure of the site to be a category list, so it can be displayed in site map and easily updated, but i am running into linking issues.

so… i want the each category to link to “/section/category_url_friendly_name/” so i can have it link to the templates in my section template group and also to the new “static pages” that i have defined as “/section/name_of_page”.

basically i need a plug in to wrap around {category_name} to make it url friendly… like replace the captials with lowercase and spaces with “_”.

i know there is that feature to use category names in the url, but it forces you to put that extra bit in the url, which i don’t need because this cateogry is mainly just for structure, not dynamically displaying content.

any ideas/input

should i do the structure completely different?

       
davenport's avatar
davenport
67 posts
17 years ago
davenport's avatar davenport

bumpidy bump bump

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

Have you taken a look at the new category related features that come with 1.6.? Allows you to assign more or less arbitrary URLs to every category, that might help.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

@davenport: I wrote a plugin called URLSafe for this very thing. It might be obsolete now with the URL titles in there for the categories, but I think it would do what you need. I’ll check to see if I posted that one anywhere. If not, I’ll post today in the plugins area.

I just posted it in the Plugins area of the forums: URLSafe Plugin

       
silenz's avatar
silenz
1,648 posts
17 years ago
silenz's avatar silenz

And before 1.6 and without plugin you could use category description or category image to store the friendly url string if you have no other use for those fields…

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.