RichardKYA
Well-known member
Hello,
I've created this navigation bar for a few of my pages and I'm having trouble with what to put in the top 3 links so that they have the active class applied when on page, I've tried a couple of things, but they didn't work.
Whenever I search for something on this, it just seems to point me to a "Nodes as tabs" add-on, which doesn't look like what I need.
Can anyone help me please?
Here's a couple of pics to help explain what I'm after...
You can see in the title what page I'm on and you can see where the tab is active when on "Most Messages" and you can see that tab doesn't stay active when on "Online now"...
Thank you
I've created this navigation bar for a few of my pages and I'm having trouble with what to put in the top 3 links so that they have the active class applied when on page, I've tried a couple of things, but they didn't work.
Whenever I search for something on this, it just seems to point me to a "Nodes as tabs" add-on, which doesn't look like what I need.
Can anyone help me please?
Code:
<ul class="member_notable_tabs tabs">
<li><a href="{xen:link online, '', 'type=registered'}">{xen:phrase members}</a></li>
<li><a href="{xen:link account/following}">{xen:phrase people_you_follow}</a></li>
<li><a href="{xen:link account/ignored}">{xen:phrase people_you_ignore}</a></li>
<li class="{xen:if '{$type} == "messages"', active}"><a href="{xen:link members}">{xen:phrase most_messages}</a></li>
<li class="{xen:if '{$type} == "likes"', active}"><a href="{xen:link members, '', 'type=likes'}">{xen:phrase most_likes}</a></li>
<li class="{xen:if '{$type} == "best_answers"', active}"><a href="{xen:link members, '', 'type=best_answers'}">{xen:phrase most_best_answers}</a></li>
<xen:if is="{$canViewFeaturedThreads} AND {$xenOptions.ctaFtNotableMembersTab}">
<li class="{xen:if '{$type} == "cta_featured_threads"', active}"><a href="{xen:link members, '', 'type=cta_featured_threads'}">{xen:phrase cta_ft_most_featured_threads}</a></li>
</xen:if>
</ul>
Here's a couple of pics to help explain what I'm after...
You can see in the title what page I'm on and you can see where the tab is active when on "Most Messages" and you can see that tab doesn't stay active when on "Online now"...
Thank you