Forums / Cotonti / Support / Highlight Active Category

Show button/link in header as active

aro747
#38724 2013-12-05 05:40

Hi all,

I'm trying to get the button in the main nav to stay 'active' when viewing pages within that category.  Unfortunately, when viewing a page in that category, I'm getting more than one button to become active.  I have in header.tpl:

<li class="<!-- IF {PHP.m} == 'page' OR {PHP.env.ext} == 'page' -->active<!-- ENDIF -->"><a href="{PHP|cot_url('page', 'c=profiles')}">Profiles</a></li>
<li class="<!-- IF {PHP.m} == 'page' OR {PHP.env.ext} == 'page' -->active<!-- ENDIF -->"><a href="{PHP|cot_url('page', 'c=cars')}">Cars</a></li>

When viewing a page in the 'Cars' category, the 'Profiles' button also becomes active.  How can I fix it?  Thanks for your help.