@All Couchies,
Greetings!!!
I have a menu with the following structure:
The class="active" is implemented to select the desired page.
I have templates for Home, Search and Contact and hence implementing the class="active" is not an issue and can be implemented easily by:
But what I want to achieve is that, When i select Concept or FAQ, the About menu item should be set to "active"
I tried doing this:
When i click on concept.php, the About menu-item has the active class applied. Also, I want the same to happen when I select faq.php.
I tried something like:
but then the class="active" doesn't implement on any.
What to do???
Regards,
GenXCoders
Greetings!!!
I have a menu with the following structure:
|- Home
|- About
|-- Concept
|-- FAQ
|- Services
|-- How We Work
|-- Help
|- Search
|- Contact
The class="active" is implemented to select the desired page.
I have templates for Home, Search and Contact and hence implementing the class="active" is not an issue and can be implemented easily by:
- Code: Select all
<cms:if k_template_name=='working.php'>class="active"</cms:if>
But what I want to achieve is that, When i select Concept or FAQ, the About menu item should be set to "active"
I tried doing this:
- Code: Select all
<li <cms:if k_template_name=='index.php'>class="active"</cms:if> ><a href="<cms:link 'index.php' />">Home</a></li>
<li class="<cms:if k_template_name=='concept.php'>active</cms:if> dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="<cms:link 'concept.php' />">Concept</a></li>
<li role="separator" class="divider"></li>
<li><a href="<cms:link 'faq.php' />">FAQ</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Services <span class="caret"></span></a>
<ul class="dropdown-menu">
<li <cms:if k_template_name=='working.php'>class="active"</cms:if> ><a href="<cms:link 'working.php' />">How We Work</a></li>
<li role="separator" class="divider"></li>
<li <cms:if k_template_name=='help.php'>class="active"</cms:if> ><a href="<cms:link 'help.php' />">Help</a></li>
</ul>
</li>
<li <cms:if k_template_name=='search.php'>class="active"</cms:if> ><a href="<cms:link 'search.php' />">Sevak Shoodh</a></li>
<li <cms:if k_template_name=='contact.php'>class="active"</cms:if> ><a href="<cms:link 'contact.php' />">Contact</a></li>
When i click on concept.php, the About menu-item has the active class applied. Also, I want the same to happen when I select faq.php.
I tried something like:
- Code: Select all
class="<cms:if k_template_name=='concept.php || faq.php'>active</cms:if>
but then the class="active" doesn't implement on any.
What to do???
Regards,
GenXCoders