The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Dynmic Link In Nav Bar
Hi guys is there anyway to make a link in my navbar so when people are on the Home page (vBAdvanced) it says "Forum" and links to it but when you are on the forum the link says "Home" and links you there?
I was thinking something like (Pseudocode): if url = http://www.britishroguewarriors.com/index.php then <a href="/forum/">Forum</a> else <a href="../index.php">Home</a> end if |
#2
|
||||
|
||||
Yes, you can use THIS_SCRIPT for that:
HTML Code:
<if condition="THIS_SCRIPT == 'whatever'"> <a href="/forum/">Forum</a> <else /> <a href="../index.php">Home</a> </if> |
#3
|
||||
|
||||
i think the name of vBAdvanced is advindex so taking lynnes code
Code:
<if condition="THIS_SCRIPT == 'advindex'"> <a href="/forum/">Forum</a> <else /> <a href="../index.php">Home</a> </if> |
#4
|
||||
|
||||
Not working :/ It's up at the moment. It doesn't seem to be 'advindex' so do you know where (file, page or line) I would find it?
|
#5
|
||||
|
||||
You need to find the line that looks like this at the top of the page. This is where THIS_SCRIPT is defined:
HTML Code:
define('THIS_SCRIPT', 'whatever'); |
#6
|
||||
|
||||
Brilliant, thanks. vBA is "adv_index".
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|