| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Hide Category Menu | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.0.18 DBest |
|||||||
#2
|
|||||||
|
|||||||
{if $main eq "catalog"}
code for categories menu {/if}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
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?
__________________
X-Cart 4.0.18 DBest |
|||||||
#4
|
|||||||
|
|||||||
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}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
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}
__________________
X-Cart 4.0.18 DBest |
|||||||
#6
|
|||||||
|
|||||||
Look at customer/home_main.tpl, it will give you all sorts of $main areas
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#7
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.0.18 DBest |
|||||||
#8
|
|||||||
|
|||||||
You need to use {elseif} statements except for the last one, i.e.
{elseif $main eq "newmenuONE"}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#9
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.0.18 DBest |
|||||||
#10
|
|||||||
|
|||||||
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).
__________________
X-Cart 4.0.18 DBest |
|||||||
|
|||
X-Cart forums © 2001-2020
|