View Single Post
  #2  
Old 09-20-2011, 09:13 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: If statement with multiple categories

Quote:
Originally Posted by someguy03
I want to have category 264, 271, 275, etc. How can I format the statement to have multiple category numbers?
Really easy, you will laugh:
Code:
{if $cat eq "264" or $cat eq "271" or $cat eq "275"} Code {else} Code {/if}
Quote:
Originally Posted by someguy03
Also, how can I have a negative if statement? So I can tell something to NOT display if it is a certain category.
Again easy (thankfully):
Code:
{if $cat ne "264"} Code {/if}
Smarty is so simple and makes so much sense.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote