PDA

View Full Version : nav selected button stance


vexxy
03-14-2010, 09:19 AM
I want to add links to some of my forums on the navbar, as categories. The thing I want to accomplish is that when I click on a forum link from the navbar, I want to have the "selected" class, changing the stance of the button for when browsing that specific forum.

Is there an IF I can add?

ex:

if $forumpage {
<li><a class="navtab" href="http://forumlink">Forum name</a></li>

else {<li><a class="selected" href="http://forumlink">Forum name</a></li>

how can i condition(via variable) which is the active forum page?

--------------- Added 1268638356 at 1268638356 ---------------

no ideas ppl?

vexxy
03-15-2010, 02:07 PM
i have resolved the issue

<vb:if condition="$foruminfo[forumid] == 'x'">
<li class="selected"><a class="navtab" href="forum_link">Forum x</a></li>
<vb:else />
<li><a class="navtab" href="forum_link">Software</a>Forum x</li>
</vb:if>

where x is the forum id