IF OR statement?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-19-2008, 01:00 PM
New Pligger
Pligg Version: 9.9
Pligg Template: heavily moded yGet
 
Join Date: Jan 2008
Posts: 22
I have searched through the code and cannot find how to do an OR statement within a IF.

Code:
 {if $pagename eq "upcoming" OR "published" OR "catergory"}
What would be the correct way to make the above statement?
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 01:03 PM
New Pligger
Pligg Version: 9.9
Pligg Template: heavily moded yGet
 
Join Date: Jan 2008
Posts: 22
LOL I worked on this for 15min and as soon as I post I figure it out

Here is the correct code for an IF OR statement

Code:
{if $pagename eq "upcoming" || $pagename eq "published" || $pagename eq "catergory"}
This also works but the above looks to be the proper way as it is exampled throughout the site code
Code:
{if $pagename eq "upcoming" OR $pagename eq "published" OR $pagename eq "catergory"}

Last edited by jasxon; 01-19-2008 at 01:17 PM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Template conditional statement for: PAGE 1 cmstheme Questions and Comments 3 09-30-2007 11:37 AM
Form Appear on If Statement ZeroHoursOfSleep Questions and Comments 1 09-14-2007 06:44 AM
General 'if' statement question aaronpais Questions and Comments 1 05-07-2007 10:25 PM
Site slogan and mission statement? noid Questions and Comments 2 10-27-2006 12:57 AM
Help with if then statement canadapc Questions and Comments 0 08-03-2006 06:20 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development