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

Quick smarty question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-07-2007, 09:48 AM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default 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?
__________________
~ Andrea Beight
Reply With Quote
  #2  
Old 12-07-2007, 09:59 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default 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
__________________
xcartmods.co.uk
Reply With Quote
  #3  
Old 12-07-2007, 10:17 AM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Re: Quick smarty question

Thanks, Phil!
__________________
~ Andrea Beight
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 12:11 PM.

   

 
X-Cart forums © 2001-2020