Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

IF ELSE coding, but 3-way

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-17-2008, 01:27 PM
 
anela2003 anela2003 is offline
 

Senior Member
  
Join Date: Nov 2007
Posts: 103
 

Default IF ELSE coding, but 3-way

I know how to edit my templates to say if category this, do this, but else, do something else. The trouble is that that creates only 2 designs.

What if I want something like this:
if cat=1 [html1]
if cat=2 [html2]
else [html3]

Advice?
__________________
4.1.9 Gold

window valances | curtains
Reply With Quote
  #2  
Old 08-17-2008, 02:01 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: IF ELSE coding, but 3-way

Code:
{if $cat == 1} -- do this -- {elseif $cat == 2} -- do this -- {else} -- if neither is true do this -- {/if}
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:44 AM.

   

 
X-Cart forums © 2001-2020