![]() |
navbar question
How do you make a link change from forum and home depending on what page your on. For example, when your on the home page it would show forum. And when your on forum it would show Home Page
|
HTML Code:
<if condition="THIS_SCRIPT == 'index'">show home link</if> |
The following error occurred when attempting to evaluate this template:
The conditional on line 89 appears to be missing its beginning tag (<if>). This may cause unexpected behavior. This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. I get that error |
whoops.... condition, not conditions. Fixed above.
|
Still not working, here is the code i'm putting in.
Code:
<td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td> |
No, that isn't correct because of two issues. First, THIS_SCRIPT is defined at the top of your php page. For instance, this is the line at the top of index.php:
Code:
define('THIS_SCRIPT', 'index'); Code:
<if condition="THIS_SCRIPT == 'index'">Home</if> Second, you want the link to look the same as this line: Code:
<td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td> Code:
<if condition="THIS_SCRIPT == 'whatever-you-call-home'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> |
ok the script at the top of my home page is
Code:
define('THIS_SCRIPT', 'provb_blhome'); My code would be this right or wrong? Code:
<if condition="define('THIS_SCRIPT', 'provb_blhome');"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> Code:
vBulletin Message |
Code:
<if condition="THIS_SCRIPT == 'provb_blhome'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> |
none of these are working. My home page is called home.php and my forum is index.php.
This is were i put the code Code:
<if condition="THIS_SCRIPT == 'provb_blhome'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> |
Code:
<td class="vbmenu_control"><if condition="THIS_SCRIPT == provb_blhome"><a href="index.php$session[sessionurl_q]">Forum</a><else /><a href="/home.php" rel="nofollow">Home</a></if></td> |
All times are GMT. The time now is 10:09 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|