View Single Post
  #1  
Old 11-19-2009, 03:53 PM
 
zebu zebu is offline
 

eXpert
  
Join Date: Oct 2006
Posts: 310
 

Default How to use an "and" statement for 3 category menus

Hi, I have created 3 category menus

1st menu displays categories with a POS between 1 and 10
2st menu displays categories with a POS between 11 and 99
3rdt menu displays categories with a POS between 100 and 999

Menu 1 & 3 are working fine.

Just need some help on how to use an "and" statement for menu 2 to only show products between 11 and 99 for Category Position.

Code I have is below:

What I really want is something like : {if $c.order_by gt 10 and lt 100 }

But doesn't seem to work - any hints from a Guru?

HTML Code:
{foreach from=$categories item=c} {if $c.order_by lt 100 } <table width="100%" cellpadding="0" cellspacing="0" border="0" valign="top"> <tr valign="top"> <td width="100%" valign="top"> <a href="home.php?cat={$c.categoryid}" class="catnav"><b>{$c.category}</b></a> {foreach from=$allcategories item=cat key=catid} {if $cat.parentid eq $c.categoryid} <a href="home.php?cat={$catid}" class="catnav_sub">&nbsp;&nbsp;&rsaquo;&nbsp;{$cat.category}</a> {/if} {/foreach} </td> </tr> </table> {/if} {/foreach}

Cheers Zane
__________________
Version 4.7.7
Reply With Quote