• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How to create a new tab?

#3
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
#4
Look at the existing tab code in the template and duplicate it, replacing the phrase and URL portions as required.
 
#5
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.
 
#8
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!