Hello all,
I am trying to modify the following menu code so that it applies the class "active" to the li, even if one of the sub-pages is selected:
<li
<cms:if k_template_name=='index.php'>class="active"</cms:if>
>
My attempt is below, which does not work (for obvious reasons I'm sure).
I have tried to make the CMS check if any of the listed pages are the "current page" - if so, apply the class active.
<li
<cms:if k_template_name=='index.php' || 'telsa_home.php' || 'tesla_x_home.php' || 'bmw_home.php' || 'renault_home.php'>class="active"</cms:if>
>
Do I need to use an Array?
I would really appreciate any advice on this, seems like it must have been mentioned before, sorry I could not find the post.
Many thanks in advance.
Steve
I am trying to modify the following menu code so that it applies the class "active" to the li, even if one of the sub-pages is selected:
<li
<cms:if k_template_name=='index.php'>class="active"</cms:if>
>
My attempt is below, which does not work (for obvious reasons I'm sure).
I have tried to make the CMS check if any of the listed pages are the "current page" - if so, apply the class active.
<li
<cms:if k_template_name=='index.php' || 'telsa_home.php' || 'tesla_x_home.php' || 'bmw_home.php' || 'renault_home.php'>class="active"</cms:if>
>
Do I need to use an Array?
I would really appreciate any advice on this, seems like it must have been mentioned before, sorry I could not find the post.
Many thanks in advance.
Steve