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

Search Results with category based URLs

How Do I?

Jos Medinger's avatar
Jos Medinger
16 posts
10 years ago
Jos Medinger's avatar Jos Medinger

We have a site with 1 products channel and the URL’s are constructed from the categories that the products fall into e.g.

/template_group/category_parent/category_child/title

This is all fine when generating links (via conditionals based on segments) within an exp:channel:entries tag however on the search results page I’m at a loss as to how to get the appropriate parent and child category entries into the URL to each result. Can anyone suggest an approach?!

       
Jos Medinger's avatar
Jos Medinger
16 posts
10 years ago
Jos Medinger's avatar Jos Medinger

OK - I found an answer to this with the following code

/template_group{categories limit="1"}/{category_url_title}{/categories}/{url_title}
       

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.