X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   IF ELSE coding, but 3-way (https://forum.x-cart.com/showthread.php?t=41808)

anela2003 08-17-2008 01:27 PM

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?

wjbrewer 08-17-2008 02:01 PM

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}



All times are GMT -8. The time now is 08:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.