View Full Version : How would I toggle between links on Navbar


rms10
30th January 2004, 10:00 PM
On the navbar I would like to display "Forums" (which will link to the forums) when the portal page is up and then replace it link with "Frontpage" (with link) when the user is in the forums. I know it must be placed under the navbar (under the navbar buttons location), but how would I do the conditional check?

<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<!---- <td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td> -->
<if ???????=??????>
<td class="vbmenu_control"><a
href="http://localhost/Vbulletin/forums/vbindex.php">Frontpage</a></td>
</if>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
</if>
Many thanks:)

HiDeo
30th January 2004, 11:28 PM
Good question
I hope to see the solution

rms10
31st January 2004, 12:57 AM
Since I am using vbindex for my portal I posted the same question on the vbindex site and received an answer. The following worked for me.

<if condition="THIS_SCRIPT == 'vbindex'"><td class="vbmenu_control"><a
href="http://localhost/Vbulletin/forums/index.php">Forums</a></td>
</if>

<if condition="THIS_SCRIPT != 'vbindex'"><td class="vbmenu_control"><a href="http://localhost/Vbulletin/forums/vbindex.php">Frontpage</a></td>
</if>

HiDeo
31st January 2004, 01:47 AM
Thanks rms10 for the solution