Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Hide Category Menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-16-2006, 11:16 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default 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
Reply With Quote
  #2  
Old 08-17-2006, 02:34 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

{if $main eq "catalog"}
code for categories menu
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-17-2006, 06:27 AM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

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
Reply With Quote
  #4  
Old 08-17-2006, 06:29 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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
Reply With Quote
  #5  
Old 08-17-2006, 06:44 AM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

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
Reply With Quote
  #6  
Old 08-17-2006, 06:50 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Look at customer/home_main.tpl, it will give you all sorts of $main areas
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 08-17-2006, 06:56 AM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

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
Reply With Quote
  #8  
Old 08-17-2006, 07:15 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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
Reply With Quote
  #9  
Old 09-12-2006, 10:14 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default 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
Reply With Quote
  #10  
Old 09-12-2006, 10:29 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:15 AM.

   

 
X-Cart forums © 2001-2020