Claiver
Member
In the navigation template I see the following line which adds a class based on if a variable is true or false:
I'd like to be able to check if a variable matches a string, such as:
What I want to achieve is applying a 'selected' class to a tab if the $selectedCustomTab is set to that tab's string, in this case "games". Is there any way I can check this?
PHP:
{xen:if $tabs.forums.selected, 'selected', 'Popup PopupControl PopupClosed'}
I'd like to be able to check if a variable matches a string, such as:
PHP:
<!-- games -->
<li class="navTab games {xen:if $selectedCustomTab == 'games', 'selected', ''}"><a href="../games/" class="navLink">Games</a></li>
What I want to achieve is applying a 'selected' class to a tab if the $selectedCustomTab is set to that tab's string, in this case "games". Is there any way I can check this?