Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2006
    Location
    Northwest Connecticut
    Posts
    87
    Plugin Contributions
    0

    Default Suppress Sideboxes Question

    Hello,

    I am trying to I want to suppress the display of the categories sidebox on all but two of the pages in my site. I found this article/tutorial --- I want to suppress the display of some of my sideboxes on my front page, but still have them show on all other pages here https://www.zen-cart.com/tutorials/i...hp?article=270 and I have got it working so that the sidebox doesn't display on the home page, but I do not know how to refer to any other pages on the site.

    This is the code I put in:

    // test if box should display
    $show_categories= true;

    if ($this_is_home_page) {
    $show_categories = false;
    } else {
    $show_categories = true;
    }

    if ($show_categories == true)

    Here is the site I am working on:

    http://peterfasano.com/zen/

    I only want the categories sidebox to appear on the Fabrics and Wallcoverings pages. How do I change the ($this_is_home_page) to refer to all the other pages, except for the two where I want the sidebox to display?

    Thank you!

  2. #2
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Suppress Sideboxes Question

    Try this as your test for setting $show_categories

    PHP Code:
    if ((isset($_GET['main_page']) && $_GET['main_page'] == 'index') && (isset($_GET['cPath']) && ($_GET['cPath'] == '1' || $_GET['cPath'] == '2'))) 
    {
      
    $show_categories TRUE;
    } else 
    {
      
    $show_categories FALSE;


  3. #3
    Join Date
    Feb 2009
    Posts
    95
    Plugin Contributions
    0

    Default Re: Suppress Sideboxes Question

    If you only want the categories sidebox to display on category and product pages you might try:
    PHP Code:
    if ((isset($_GET['cPath']))&& ($_GET['cPath'] != 3)){
        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_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
        } 
    Which is based on this tutorial:
    https://www.zen-cart.com/tutorials/i...hp?article=249


    You can use this :
    PHP Code:
    && ($_GET['cPath'] != 
    to exlude whatever other pages that you don't want the categories sidebox to display on.

    You'll have to test this out yourself. No guarantees here.

  4. #4
    Join Date
    Dec 2006
    Location
    Northwest Connecticut
    Posts
    87
    Plugin Contributions
    0

    Default Re: Suppress Sideboxes Question

    Hello, Thank you both for replying, I tried what Wilt suggested and it works... so this is great1 I don't know if what jwitt98 suggested works, I had looked at that tutorial also while I was trying to figure out how to do this, but I wasn't sure if it would work because although I have the pages set up as EZ pages, the pages I want the sidebox to appear on are not really ez pages, they are category/product pages. Thanks!

  5. #5
    Join Date
    Feb 2009
    Posts
    95
    Plugin Contributions
    0

    Default Re: Suppress Sideboxes Question

    I didn't see Wilt's post until after I had already submitted mine.
    Glad you got it working

  6. #6
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Suppress Sideboxes Question

    Theres always more than one way of doing something.

    Thats the good thing about this forum. lots of different ideas about how to do solve a problem.

  7. #7

    Default Re: Suppress Sideboxes Question

    Thank you so much for this thread! I've been looking for several days and finally found this post and the answer to my question. Kudos to Wilt.

    Kim

 

 

Similar Threads

  1. Sideboxes question
    By nidkolio in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 May 2009, 12:58 PM
  2. ZJ Black 2 question on sideboxes
    By mumzie in forum Addon Templates
    Replies: 0
    Last Post: 21 Jan 2009, 01:26 AM
  3. How can I suppress on the sideboxes from showing?
    By kachana in forum Customization from the Admin
    Replies: 4
    Last Post: 30 Oct 2008, 11:49 PM
  4. Question about sideboxes.
    By kellierice in forum General Questions
    Replies: 1
    Last Post: 5 Aug 2006, 09:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR