PDA

View Full Version : conditional help


KevinM
10-26-2004, 08:12 PM
Is it possible to write a conditional statement in a template based on which page the template is being viewed in?

e.g. IF pageviewed = 'main index' THEN 'do this' ELSE 'do that'

All help appreciated.

Colin F
10-26-2004, 08:17 PM
yes, you can use the THIS_SCRIPT constant which is set at the top of all the main files.

Zachery
10-26-2004, 09:32 PM
Is it possible to write a conditional statement in a template based on which page the template is being viewed in?

e.g. IF pageviewed = 'main index' THEN 'do this' ELSE 'do that'

All help appreciated.
Specificly

<if condition="THIS_SCRIPT == index"> code for the forumhome/index <else /> Every other page </if>

KevinM
10-28-2004, 05:53 PM
Thanks for your help, it worked like a charm ;)