Evening folks,
I’m using channel categories to create a menu, which works of a fashion. I need to add and active class to the “a” when the correct entry is open.
{exp:channel:categories channel="project" style="nested" show_empty="no" id="mainNav"}
<a href="http://{path=%27work/details/category/{category_url_title}%27}" title="{category_name}">__{category_name}__</a>
{/exp:channel:categories}Seems the code strips the conditional…. so insert this in the a tag:
if segment_4 == “category_url_title” class=“active” /if
Sadly the if conditional is not working… any ideas why?
Cheers