Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Hide product category sidebar when on EZ pages

    Hello,

    I have a client who wants to hide their product category sidebar when you are on an EZ Page (I know, I know...). lIs this possible? If so, how?

    Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Hide product category sidebar when on EZ pages

    The whole sidebar, or just the categories sidebox?

    It can be done with CSS (quick & dirty) or by a small edit in a PHP file (which file depends on exactly what you want to do).

  3. #3
    Join Date
    May 2008
    Location
    Maryland, USA
    Posts
    73
    Plugin Contributions
    0

    Default Re: Hide product category sidebar when on EZ pages

    I am also working on a client's site, and need to hide specific categories on specific EZ Pages. What is the best way to do it? I saw some discussion about creating a CSS file; would appreciate any help on the best way to accomplish it. Thank you!

    Irina

  4. #4
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Re: Hide product category sidebar when on EZ pages

    Quote Originally Posted by gjh42 View Post
    The whole sidebar, or just the categories sidebox?

    It can be done with CSS (quick & dirty) or by a small edit in a PHP file (which file depends on exactly what you want to do).
    Just the sidebox. The EZ Pages sidebox (and a few others) will still be displayed.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Hide product category sidebar when on EZ pages

    Quick & dirty: Add to your stylesheet

    #pageBody #categories {display: none;}


    Proper way: Edit /includes/modules/sideboxes/categories.php; at the top of the file, add

    if ($current_page_base != 'page') {

    before
    $main_category_tree = new category_tree;

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

    }

    Save the edited file to /includes/modules/sideboxes/your_template/categories.php

  6. #6
    Join Date
    May 2008
    Location
    Maryland, USA
    Posts
    73
    Plugin Contributions
    0

    Default Re: Hide product category sidebar when on EZ pages

    Quick & dirty: Add to your stylesheet
    #pageBody #categories {display: none;}
    This works great for hiding ALL categories on an EZ page.

    What if I needed to hide several, but not all, categories on a page? Not sure of the best way of doing it (client's choice, BTW).

    Would greatly appreciate any ideas on how to go about it. I'm quite stuck here

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Hide product category sidebar when on EZ pages

    You mean just some of the category links in your categories sidebox? The only way beside new custom coding would be to install Categories Dressing, configure it so that the desired categories were in "groups" (see the readme), and add a rule to your stylesheet like

    #pageBody #catGroup23, #pageBody #catGroup47, #pageBody #catGroup69 {display: none;}

  8. #8
    Join Date
    May 2008
    Location
    Maryland, USA
    Posts
    73
    Plugin Contributions
    0

    Default Re: Hide product category sidebar when on EZ pages

    Yes, that's what I am talking about. Since I can't write my own custom coding, I'll try your second suggestion. I'll be back Thank you so much for great advice--always!

    Irina

  9. #9
    Join Date
    Jun 2010
    Posts
    207
    Plugin Contributions
    1

    Default Re: Hide product category sidebar when on EZ pages

    Quote Originally Posted by gjh42 View Post
    Quick & dirty: Add to your stylesheet

    #pageBody #categories {display: none;}


    Proper way: Edit /includes/modules/sideboxes/categories.php; at the top of the file, add

    if ($current_page_base != 'page') {

    before
    $main_category_tree = new category_tree;

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

    }

    Save the edited file to /includes/modules/sideboxes/your_template/categories.php

    This code works, but it does the opposite of what I want to do... it hides the product categories sidebox when you are on a product-related page; I want the products sidebox to be hidden when you are on any of the EZ Pages. :)

    Possible?

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Hide product category sidebar when on EZ pages

    Exactly how did you copy the code into your file? As written here, it will only show the sidebox if $current_page_base is NOT 'page'.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Removing Product Count From Category Sidebar
    By educky in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Nov 2010, 01:27 AM
  2. How do I hide unsecure links when secure pages are shown?
    By dmm2020 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 23 Feb 2009, 07:31 PM
  3. Stop sidebar banner display on product info pages
    By matt123 in forum Basic Configuration
    Replies: 1
    Last Post: 4 Jan 2008, 08:57 AM
  4. Hide Category images on product pages
    By bvrettski in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 3 Jan 2008, 04:17 AM
  5. Detecting when a user is on main/category/product pages
    By rhutchison in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Apr 2007, 09:57 AM

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