PDA

View Full Version : template conditional help


Benj
10-18-2007, 11:16 PM
need something along the lines of

<if condition="this_page="pagename">

any ideas?

Adrian Schneider
10-18-2007, 11:58 PM
<if condition="THIS_SCRIPT == 'pagename'">where you are viewing pagename.php

Benj
10-20-2007, 05:45 PM
works a treat n1, one thing tho anyway i can check if This_script = more than one page for example want to test if this script = index or forumdisplay

cheers

Freesteyelz
10-20-2007, 06:12 PM
Try:


<if condition="in_array(THIS_SCRIPT, array('index', 'forumdisplay'))">



If you want to add more scripts just add a comma then the file name with the single quote.

Benj
10-21-2007, 07:18 PM
n1 mate

--------------- Added 1193066800 at 1193066800 ---------------

yep back again...... :D


need to test if this script = forumdisplay.php?f=2 and index.php?sub=places how would i go about doing that....

thanks for the help so far guys!

Benj
10-23-2007, 08:01 PM
bump

Freesteyelz
10-23-2007, 08:06 PM
For specific forums you can use:


<if condition="in_array($forumid, array(x,y,z))">
</if>



Just replace "x,y,z" with the respective forum IDs. I'm not sure about "index.php?sub=places, however.