PDA

View Full Version : [HOW TO - vB4] Adding a Link to Navbar


almannai
03 Jul 2010, 19:50
1. Go to
Admincp > Styles and Templates > Style Manager > MASTER STYLE (this will effect all style or just choose the Style you want to add link to it)> Navigation / Breadcrumb Templates > Navbar

open it and search for

{vb:raw template_hook.navtab_end}

Add above

<vb:if condition="THIS_SCRIPT == 'mynewpage'">
<li class="selected"><a class="navtab" href="mynewpage.php">mylink</a></li>
<vb:else />
<li><a class="navtab" href="mynewpage.php">mylink</a></li>
</vb:if>



Search for

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">


Replace with

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'mynewpage'">




2. Save and you are done.

james6578
02 Feb 2011, 15:50
thanks almannai, been looking for something like this for hours!

btw, for other users, when I searched for {vb:raw template_hook.navtab_end} it came back 'Not Found' so try searching for 'template_hook' instead until you ind the right one.

otterag
08 Mar 2011, 15:13
I am using vb 4.1.2 cms and found the

{vb:raw template_hook.navtab_end}

added the code above it, with my page link and the title that i wanted the tab.

<vb:if condition="THIS_SCRIPT == 'mynewpage'">
<li class="selected"><a class="navtab" href="mynewpage.php">mylink</a></li>
<vb:else />
<li><a class="navtab" href="mynewpage.php">mylink</a></li>
</vb:if>

but when clicked it still showed the home tab selected. but when i searched for

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">

it didnt come up, the only thing i could fine in the script was

<vb:if condition="!$vboptions['selectednavtab']>

I am not sure what to do with this.

christian gate
15 Aug 2011, 17:53
:confused:I am using vb 4.1.5 cms and found the

{vb:raw template_hook.navtab_end}

added the code above it, with my page link and the title that i wanted the tab.

But when I click The new tabs it still show the Forum tab selected

The new tabs are linked to other forum and I tried to disable the Show Forum Link in Menu but it's still showing, Can someone help please, Thanks

matrex722
04 Apr 2013, 16:38
nice work