Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    13
    Plugin Contributions
    0

    Default Removing categories side box from index page only

    Title says it all. I am trying to diable the categories sidebox from displaying on the main page. www.caitybugscorner.com
    Thanks for any help

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Removing categories side box from index page only

    Quote Originally Posted by rack14650 View Post
    Title says it all. I am trying to diable the categories sidebox from displaying on the main page. www.caitybugscorner.com
    Thanks for any help
    Ra,
    How about trying this little helpful hint from the Tutorials/Faq

    1. Search for:
    2. disable sideboxes
    3. And we get:
    4. https://www.zen-cart.com/tutorials/i...hp?article=270

  3. #3
    Join Date
    Jan 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: Removing categories side box from index page only

    I have been trying that exact code and can't seem to get it to work. Yes I am a new zenner but I am quite aware of the search feature. Just don't quite understand it all.

  4. #4
    Join Date
    Jan 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: Removing categories side box from index page only

    Below is the code from my includes/modules/sideboxes/categories.php

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

    // 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);
    if ($this_is_home_page) {
    $show_categories = false;
    } else {
    $show_categories = true;
    }
    ?>

  5. #5
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Removing categories side box from index page only

    Ra,
    Change the category.php to this please:

    PHP Code:
    <?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 $
     */
      
    if ($this_is_home_page) {
        
    $show_categories false;
      } else {
        
    $show_categories true;
      }
      if (
    $show_categories == true)
    {
        
    $main_category_tree = new category_tree;
        
    $row 0;
        
    $box_categories_array = array();

    // 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_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
    }
    ?>

  6. #6
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Removing categories side box from index page only

    Ra,
    Did that little code work for you??????

    You have a few problems on the site, when I click on the Products, About Us.

    1. You need to fix

 

 

Similar Threads

  1. v150 Removing side columns from main page ONLY
    By meljen in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Sep 2012, 11:03 PM
  2. Sub Categories Only In Side Box?
    By awiss in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 16 Mar 2011, 05:27 PM
  3. Adding/Removing products from side box
    By dollardeals8 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Jul 2010, 02:21 PM
  4. Make categories side box different from other side boxes
    By Jeff G in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 20 Nov 2007, 10:16 PM
  5. SQL error from side box index
    By 24star in forum General Questions
    Replies: 4
    Last Post: 28 Sep 2006, 12:02 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