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)
-   -   Help with IF statement for category display (https://forum.x-cart.com/showthread.php?t=33871)

BobTastic 09-12-2007 08:39 AM

Help with IF statement for category display
 
Hi,

I want to display a column on the right on certain pages. I have this column in home.tpl and I have successfully managed to get it to not be displayed on the home page of the site, but cannot figure out how to remove it from other pages. Here is the code I have at the moment:

{if $main eq "catalog" and $current_category.category eq ""}{else}<td valign="top" class="VertMenuRightColumn">
{include file="symbols.tpl"}</td>{/if}

Ideally I don't want the column to appear on any pages except certain category pages (but not all category pages). Let's say I want it to show on category 1, 5, 9, and 11. What is the correct code to use?

Thanks for your time.

carpeperdiem 09-12-2007 10:05 AM

Re: Help with IF statement for category display
 
Thit thread may point you in the right direction...

http://forum.x-cart.com/showthread.php?t=32768

Jon 09-12-2007 10:34 AM

Re: Help with IF statement for category display
 
{if $main eq "catalog" AND ($current_category.categoryid eq "1" OR $current_category.categoryid eq "5" OR $current_category.categoryid eq "9" OR $current_category.categoryid eq "11")}
Show Column
{/if}

BobTastic 09-14-2007 09:10 AM

Re: Help with IF statement for category display
 
Thanks Jon. It works a treat.

Although I would also like the right column to appear on ALL product pages too. What code do I add to make this happen?

Thanks a lot for your help with this.


All times are GMT -8. The time now is 06:44 PM.

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