Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Remove categories list from certain pages

Remove categories list from certain pages

Locked

Views: 628

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
30 Nov 2010, 12:28 PM
#1
lainybroon avatar

lainybroon

New Zenner

Join Date:
Mar 2010
Posts:
2
Plugin Contributions:
0

Remove categories list from certain pages

Hi I have found a solution on the forum which puts display none on the stylesheet, which iIdon't want to use. Is it not ideal for accessibility
Does anyone have a code /non css solution for this
I need eg if page = contact us or page_2 then do not display the left column category list
thanks for any guidance...
( note i am using the flyout menu for top horizontal nav, so only sub categories display on the left menu )

30 Nov 2010, 1:35 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: Remove categories list from certain pages

This tutorial describes how to turn off the entire left/right sidebox for certain pages, and might provide you a starting point for turning off only the categories sidebox on certain pages.

30 Nov 2010, 2:23 PM
#3
lainybroon avatar

lainybroon

New Zenner

Join Date:
Mar 2010
Posts:
2
Plugin Contributions:
0

Re: Remove categories list from certain pages

Hi..thanks for the reply..but I have been through that tutorial and many others. Disabling left and right is not a problem. It seems that isolating parts of the sidebox are more complex and i can't find a tutorial on that ( apart from display:none on css)

30 Nov 2010, 6:57 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: Remove categories list from certain pages

Since it's only the categories side-box that you don't want displayed on the contact_us page, you can edit/create /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php to add:

if ($_GET['main_page'] != FILENAME_CONTACT_US) {

as the first line after the comments and

}

as the next-to-last line (just before the >?). That will cause the side-box to be displayed on all pages except contact_us (unless the whole sidebox is disabled).

30 Nov 2010, 7:09 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Remove categories list from certain pages

"isolating parts of the sidebox are more complex and i can't find a tutorial on that"

Go to Tutorials/FAQ and select the Sideboxes article category. There are three articles on the first page that deal with this exact topic in various ways.