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)
-   -   Quick smarty question (https://forum.x-cart.com/showthread.php?t=35997)

abeight 12-07-2007 09:48 AM

Quick smarty question
 
I want to display a block of text for certain categories. I have this smarty code:

{if $smarty.get.cat eq "292"}some text{/if}

How do I change that to show the text for multiple category numbers?

PhilJ 12-07-2007 09:59 AM

Re: Quick smarty question
 
Just $cat should suffice...
Code:

{if $cat eq "292" || $cat eq "293"}
Code:

{if $cat gte "292" || $cat lte "393"}
etc.
http://smarty.php.net/manual/en/language.function.if.php

abeight 12-07-2007 10:17 AM

Re: Quick smarty question
 
Thanks, Phil! :)


All times are GMT -8. The time now is 06:45 AM.

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