Zen Cart Logo
Forums / General Questions / Help hiding a sidebox from certain pages

Help hiding a sidebox from certain pages

Views: 697

Results 1 to 4 of 4
18 Apr 2013, 10:33 AM
#1
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Help hiding a sidebox from certain pages

hi,

i want to hide my categories sidebox on manufacturers pages, but I do not know how and I have failed.

I use this from Ajeh's posts to hide it on Define Pages,

 //BOF PART 1 OF 2 FOR CAT SIDEBOX OFF ON SOME PAGES
$show_categories = true; 
    if (in_array($_GET['main_page'], array(FILENAME_LOGOFF, FILENAME_LOGIN, FILENAME_PRIVACY, FILENAME_CONTACT_US, FILENAME_CONDITIONS, FILENAME_SHIPPING, FILENAME_CREATE_ACCOUNT, FILENAME_UNSUBSCRIBE, FILENAME_SITE_MAP))) { 
      $show_categories = false; 
    } else { 
      $show_categories = true; 
    } 

if ($show_categories == true) { //EOF PART 1 OF 2 FOR CAT SIDEBOX OFF ON SOME PAGES
//OTHER CODE
//BOF 2 OF 2 FOR CAT SIDEBOX OFF ON SOME PAGES 
}
//EOF 2 OF 2 FOR CAT SIDEBOX OFF ON SOME PAGES

But adding FILENAME_MANUFACTURERS or FILENAME_MANUFACTURERS_ID to the list does not work. So I am guessing something else needs to be done???

hope someone can help me?
TIA

18 Apr 2013, 10:38 AM
#2
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Help hiding a sidebox from certain pages

I also use this (another of Ajeh's posts)

 if (!isset($ezpage_id) || !in_array($ezpage_id,explode(",",'1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35'))) {
    require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php');

    $title = BOX_HEADING_CATEGORIES;
    $title_link = false;

    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

But swapping $ezpage_id for $manufacturers_id does not work either??

(I must point out that I really don't know what I am doing) :laugh:

18 Apr 2013, 3:12 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Help hiding a sidebox from certain pages

You are using the second bit in the categories sidebox module file, right?
Try something like```php
if (!isset($_GET['manufacturers_id']) ) {

1 May 2013, 12:07 PM
#4
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Help hiding a sidebox from certain pages

Hi, sorry for the late reply. nope, I couldn't get it to work. I know it is something I am doing wrong, but what exactly escapes me. lol