0

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?!

1 Answer 1

0

OK - I found a solution using the {categories} tags...

<a href="/template_group{categories limit="1"}/{category_url_title}{/categories}/{url_title}">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.