XF 1.5 How to create a new tab?

Walkman Archive

Active member
So I guess again I need to add code...
Can you tell me which code should I add for a simple tab with no drop down list or anything else except a link to a page or post?

thanks!
 

Brogan

XenForo moderator
Staff member
Look at the existing tab code in the template and duplicate it, replacing the phrase and URL portions as required.
 

justinhowe

Member
For that positioning, you can either add it after the members tab or extra tabs: end section. I usually choose the latter:

Code:
<!-- extra tabs: end -->
<xen:if is="{$extraTabs.end}">
        <xen:foreach loop="$extraTabs.end" key="$extraTabId" value="$extraTab">

...nested tags and stuff...

</xen:foreach>
        </xen:if>

<li class="navTab myNewTab PopupClosed"><a href="someHref" class="navLink">{xen:phrase someNewPhrase}</a></li>
That last line is what you'll add to make the tab. You can give it a custom CSS class like "myNewTab", as I exampled, or keep it something familiar like "home" to copy that styling. Change the "someHref" to the href, and the "someNewPhrase" to a new phrase that you can create in the Phrases section of Appearance.

EDIT: If it's a node that you want to add as a tab, there's an add-on called "Nodes as Tabs" that will let you make navTabs from nodes.
 

Walkman Archive

Active member
For that positioning, you can either add it after the members tab or extra tabs: end section. I usually choose the latter:

That last line is what you'll add to make the tab. You can give it a custom CSS class like "myNewTab", as I exampled, or keep it something familiar like "home" to copy that styling. Change the "someHref" to the href, and the "someNewPhrase" to a new phrase that you can create in the Phrases section of Appearance.

EDIT: If it's a node that you want to add as a tab, there's an add-on called "Nodes as Tabs" that will let you make navTabs from nodes.
Great, that is clear enough now! Thanks!
 
Top