Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Remove Right column from Sub Categories

    Hi I need to know how to remove the right column from all sub-categories. I can remove them on top level categories and pages but can't seem to work out how to remove sub categories. My code is below:

    if (in_array($current_page_base,explode(",",'shippinginfo,privacy,conditions,contac t_us,site_map,gv_faq,discount_coupon,unsubscribe,advanced_search,products_new,pr oducts_all')) ) {
    $flag_disable_right = true;

    }

    if (in_array($cPath,explode(",",'74,83,75,70,69,68,76,77,80,73,78,71,82,79,72,81,6, 1,24,25,26,27,28,29,30,31,32,33')) ) {
    $flag_disable_right = true;
    $flag_disable_left = false;
    }



    I tried something like

    if (in_array($product_info&cPath,explode(",",'1_2_38&products_id=1')) ) {
    $flag_disable_right = true;
    $flag_disable_left = false;
    }

    But that doesn't work and tried a few variations.

    Please can someone let me know how I would do this???

    Thanks

    Nick

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

    Default Re: Remove Right column from Sub Categories

    To affect the subcategory 1_2_38 page, add 1_2_38 to the list:

    if (in_array($cPath,explode(",",'74,83,75,70,69,68,76,77,80,73,78,71,82,79,72,81,6, 1,24,25,26,27,28,29,30,31,32,33,1_2_38')) ) {
    $flag_disable_right = true;
    $flag_disable_left = false;
    }

    But if you want to affect all category and subcategory pages (but not the home page), try


    if ($current_page_base == 'index' and !$this_is_home_page) {
    $flag_disable_right = true;
    $flag_disable_left = false;
    }


    You have a long list of pages to disable the right column on. What pages do you want it active on? It might be easier to write a short list for
    $flag_disable_right = false;
    }else{
    $flag_disable_right = true;
    }
    Last edited by gjh42; 16 Jul 2009 at 12:20 AM.

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: Remove Right column from Sub Categories

    That was weird, didn't work when I tried that first off.

    Works now though :)

    Thanks

    Nick

 

 

Similar Threads

  1. Remove certain categories/sub categories from sitemap
    By moesoap in forum General Questions
    Replies: 4
    Last Post: 30 Mar 2012, 08:52 PM
  2. Remove sub categories from sidebar?
    By khanse44 in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 19 Oct 2010, 05:34 PM
  3. Having an issue with removing right column from sub cats page
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Sep 2009, 10:01 PM
  4. Need help to remove left and right column from template
    By jeba in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2009, 03:08 PM
  5. Remove right column from Cart page
    By MCanes in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 2 Jun 2007, 03:45 AM

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