![]() |
Hide Category Menu
I would like to hide temporarily the Category Menu that is on the left side
when vistior is NOT in catalog (seeing a category, or seeing a product). I only want the Category menu to show if visitor IS seeing a category or product. Else, is not available on the left side. I thought about using this, but I don't know where and how to put it. What file, and before and after what? {if $main eq "catalog" and $current_category.category eq ""} Thanks. |
{if $main eq "catalog"}
code for categories menu {/if} |
I want it to be,
{if $main eq "catalog"} {include categories.tpl} {esle} {include NEWMENU.tpl} {/if} Will the above code work? and in what file and where in that file do I put it? |
Not quite. Have a look at customer/home.tpl and you'll see where it goes:
{if $main eq "catalog"} {include file="customer/categories.tpl"} {else} {include file="customer/newmenu.tpl"} {/if} |
Thanks, are there other "main" areas besides "catalog"?
And how do i know what they are, and what xcart calls them? That way i can go show a specific menu based on the MAIN. {if} {if $main eq "catalog"} {include file="customer/categories.tpl"} {/if} {else} {if $main eq "newmenuONE"} {include file="customer/newmenuONE.tpl"} {/if} {else} {if $main eq "newmenuTWO"} {include file="customer/newmenuTWO.tpl"} {/if} {else} {if $main eq "newmenuTHREE"} {include file="customer/newmenuTHREE.tpl"} {/if} {/if} |
Look at customer/home_main.tpl, it will give you all sorts of $main areas :)
|
ur the man balinor!
did i write my if structure correctly? i wrote it so that it makes sense to me, but i dont know if the syntax is correct. |
You need to use {elseif} statements except for the last one, i.e.
{elseif $main eq "newmenuONE"} |
Re: Hide Category Menu
What is this do /show/not show
Please break them down in simple terms {if $main ne "catalog" or $current_category.category ne ""} and how about this one {if $main eq "catalog" and $current_category.category eq ""} thanks. |
Re: Hide Category Menu
Basically what Im trying to achieve is this
If your are in home page, {include file=A.tpl"} If NOT at home page, {include file=B.tpl"} If NOT at home page, but $main eq "manufacturers_list" {include file=C.tpl"} If NOT at home page, but $main eq "cart" {include file=D.tpl"} If NOT at home page, but $main eq "checkout" {include file=E.tpl"} What code will give me At home page and what code will give me NOT at home page (meaning anywhere else). |
All times are GMT -8. The time now is 12:39 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.