![]() |
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:
Cheers Zane |
Re: How to use an "and" statement for 3 category menus
Managed to get it to work using two if statements. Is this the best way?
{if $c.order_by lt 100 } {if $c.order_by gt 10 } |
Re: How to use an "and" statement for 3 category menus
You were close. Try:
{if $c.order_by gt 10 and $c.order_by lt 100 } |
Re: How to use an "and" statement for 3 category menus
For 4.0x I'm looking to add a header to each of the broken out categories (Only if there are categories listed between the $categories[cat_num].order_by). Any ideas?
Here's my current code: <p><font class="VertMenuTitleGold">Category Name One</font></p> {section name=cat_num loop=$categories} {if $categories[cat_num].order_by gt 200 AND $categories[cat_num].order_by lt 299} <FONT class="CategoriesListCaps"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItemsWht">{$categories[cat_num].category}</A></FONT><BR> {/if} {/section} <p><font class="VertMenuTitleGold">Category Name Two</font></p> {section name=cat_num loop=$categories} {if $categories[cat_num].order_by gt 300 AND $categories[cat_num].order_by lt 399} <FONT class="CategoriesListCaps"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItemsWht">{$categories[cat_num].category}</A></FONT><BR> {/if} {/section} Thanks... |
All times are GMT -8. The time now is 09:42 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.