Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    24
    Plugin Contributions
    0

    Default Turn off categories sidebox for ==Main_Pages?

    Hi All,

    I'm looking to turn off my categories sidebox for my main_pages==

    I have ez pages set for my products just don't want the categories sidebox to display when a user jumps to the other info, can some one help me with the code for this please, I was trying to rework a piece of code as below but got nowhere.

    Here is a link to my site:http://www.crearty-kids.co.uk/creativity

    Here is the code I was looking to rework - it was for banner box 2 (although there may be an easier way!)

    // test if box should display
    $show_banner_box2 = true;
    if (SHOW_BANNERS_GROUP_SET8 == '') {
    $show_banner_box2 = false;
    }

    // do not show if on advanced_search page
    if ($current_page_base == 'advanced_search') {
    $show_banner_box2 = false;
    echo 'I am hiding!!' . $current_page_base;
    }

    if ($show_banner_box2 == true) {
    $banner_box[] = TEXT_BANNER_BOX2;
    $banner_box_group= SHOW_BANNERS_GROUP_SET8;

    require($template->get_template_dir('tpl_banner_box2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box2.php');

    // if no active banner in the specified banner group then the box will not show
    // uses banners in the defined group $banner_box_group
    if ($banner->RecordCount() > 0) {

    $title = BOX_HEADING_BANNER_BOX2;
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    }

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Turn off categories sidebox for ==Main_Pages?

    if you need to turn off the column you can follow this tutorial

    https://www.zen-cart.com/tutorials/i...hp?article=233

    if you need to turn off specific sidebox only follow this

    https://www.zen-cart.com/tutorials/i...hp?article=270

  3. #3
    Join Date
    Apr 2009
    Posts
    24
    Plugin Contributions
    0

    Default Re: Turn off categories sidebox for ==Main_Pages?

    Many thanks for your help but I've managed to completely break it now!

    Can you take a look for me please

    What I am trying to achieve is to only show the categories sidebox on the three ezpages links I have set as my main nav and then it switches off when user goes to shipping info or any other 'defines page editor' page.

    The code I have for the categories side box (module) is now:

    <?php
    /**
    * categories sidebox - prepares content for the main categories sidebox
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: categories.php 2718 2005-12-28 06:42:39Z drbyte $
    */

    $main_category_tree = new category_tree;
    $row = 0;
    $box_categories_array = array();

    if ($main_page=index&cPath='1,2,3,4') {
    $show_categories = true;
    } else {
    $show_categories = false;



    // don't build a tree when no categories
    $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
    if ($check_categories->RecordCount() > 0) {
    $box_categories_array = $main_category_tree->zen_category_tree();
    }



    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);

    }

    ?>


    Many thanks in advance,
    Alan

  4. #4
    Join Date
    Sep 2006
    Posts
    542
    Plugin Contributions
    0

    Default Re: Turn off categories sidebox for ==Main_Pages?

    includes>templates>your template>templates>tpl_index_default.php

    Just after the <div class="centerColumn" id="indexDefault">
    add this line

    if (in_array($current_page_base,explode(",",'indexHome')) ) {
    $flag_disable_left = true;

    this takes it off the index page. what other pages do you want it removed from?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Play with it long enough and you will break it.

 

 

Similar Threads

  1. Turn off left sidebox in all but categories page
    By Matthew Kin in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Mar 2015, 01:53 PM
  2. Turn Off Better Categories for Sub-Category
    By Craig Robbo in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 29 Jun 2009, 03:45 AM
  3. Categories-tab menu On/Off (it wont turn off!)
    By craigpowell in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Sep 2008, 09:15 PM
  4. Turn Off Sub-Categories in Sidebox
    By jacque427 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Dec 2006, 03:01 AM
  5. wordpress add-on, looking for list item styling to turn off bullet point in sidebox
    By joshuaself in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 26 Oct 2006, 11:06 PM

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