PDA

View Full Version : Coding noob having trouble with <IF> tag


TeddyKGB
16 Jan 2007, 05:14
I am looking at using the <IF> statement in one of my templates and I am having trouble, hoping somone here can assist.

I am looking to have on navbar button do 2 different things depending on the current page. So it would look something like this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Basically if you are on /forumindex.php the button will take you to /index.php and vice versa. Is this possible and if so what is the proper syntax of the condition (highlighted in red) that I need to use?

Thanks in advance

calorie
16 Jan 2007, 05:22
In the vB PHP files you will find constants:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Use THIS_SCRIPT in template conditionals:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

TeddyKGB
16 Jan 2007, 05:32
Brilliant!

Thank you SO much calorie. Worked like a charm.