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)
-   -   Hiding a category from the side bar (https://forum.x-cart.com/showthread.php?t=8724)

DanUK 08-02-2004 01:47 AM

Hiding a category from the side bar
 
I'm sure this is simple to do but am not sure how to do it. I have a "free gifts" category but I don't want the category name on display in the categories menu on the left hand side. I gather the code would have to go into categories.tpl near the category looping statement below?

Code:

{section name=cat_num loop=$categories}
<font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font>


Some sort of an "if" statement perhaps? I'm using 3.5.4.

Thanks

Dan

BCSE 08-02-2004 02:25 AM

I believe it's as simple as "disabling" it an admin side and then linking to products in it. If you want to link to the whole category, you'll need to keep it enabled and change this:

Code:

<font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font>

to:
Code:

{if $categories[cat_num].categoryid ne freecatid}
<font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font>
{/if}


and change freecatid with what ever categoryid number the free category is.

Hope that helps!

Carrie

DanUK 08-02-2004 04:25 AM

Thanks for this Carrie, and also for the other hacks of yours I've just done!

Dan

zilker 08-26-2004 07:32 AM

Very nice tweak, thanks so much. I was at the point in a current project where I needed something like that. Funny thing is, I wasn't searching for it when I stumbled across this post.

Lucky? Fortunate? Who cares but thx again.


All times are GMT -8. The time now is 10:38 PM.

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