Hello, I am trying to incorporate my HTML menu into the CouchCMS content management system.
I need to set an active class on the parent
Here is my working code:
<li
<cms:if k_template_name=='index.php'>class="active"</cms:if> >
<a href="<cms:link 'index.php' />" ><img class="homeIcon" src="../images/home_icon.png" width="20px">Self-Drive Hire</a>
The above adds the ‘Active’ class to the parent
However, I would also like to add the class “Active” to the parent
So in effect, add the “Active” class
if
k_template_name== index.php or tesla_home.php or telsa_x_home.php
I tried the following:
<cms:if k_template_name==‘index.php’ || ‘telsa_home.php’ || ‘tesla_x_home.php’ || ‘bmw_home.php’ || ‘renault_home.php’>class=“active”</cms:if>>
But as expected this did not work. I presume I should be using an Array - but all my attempts have failed and I am struggling to get my head around it.
Any help would be greatly appreciated.
Regards
Steve