PDA

View Full Version : Another if condition question


AFMichael
02-10-2006, 12:51 AM
Ok, how would I use the if condition coding to check multiple things? For instance:

<if condition="THIS_SCRIPT == 'profile'">
// Code
</if>

The coding above checks to see if the page is profile.php. Now, if I wanted to check multiple things, how would I go about that? I tried the following:

<if condition="THIS_SCRIPT == 'profile' OR 'private' OR 'calendar'">
// Code
</if>

I was hoping that this would see if their are either on the profile, private, or calendar PHP pages, but this shows across all of the forums. Anyone know a way to check and see if they are on one of the 3 pages in one condition statement? I am able to do this by using seperate condition tags for each page, but that's a ton of coding to go through.

Marco van Herwaarden
02-10-2006, 07:33 AM
You must write out the conditions, ie:

<if condition="THIS_SCRIPT == 'profile' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'calendar'">