Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2011
    Posts
    76
    Plugin Contributions
    0

    Default How to Just turn off Categories on Front page ?

    I have removed Categories off my main Page but I cannot seem to get them to work on any other page now ,

    I went to Tool>Layout box control> then turned off sideboxes/document_categories.php

    have tried Layout settings : Categories - Always Show on Main Page to 0 but still shows on main page

    I just wanted to turn them off on the main page ?

    Thanks
    Last edited by psvialli; 15 Mar 2013 at 02:47 PM.

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

    Default Re: How to Just turn off Categories on Front page ?

    Turning off the document-categories sidebox will hide it everywhere, but that is not what displays the regular categories anyway.
    Layout settings : Categories - Always Show on Main Page to 0
    will stop the categories display in the center column of the homepage; it has nothing to do with the categories sidebox.

    What exactly do you want to show and not show on home and other pages? A link to see the current behavior may help us advise correctly.

  3. #3
    Join Date
    Mar 2011
    Posts
    76
    Plugin Contributions
    0

    Default Re: How to Just turn off Categories on Front page ?

    Hi,

    The temp link is :http://www.quantumistic.co.uk/claims...iondata.co.uk/

    I am trying to just get the Side Categories on the Products page , so every page apart from the Front page.

    I have set Always Show on Main Page to 0

    but it still shows ?

    Thanks
    Last edited by psvialli; 15 Mar 2013 at 06:19 PM.

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

    Default Re: How to Just turn off Categories on Front page ?

    As I said, the "Always Show on Main Page" refers to the center column, not the sidebox. For this, you need to add a test to the categories sidebox module file, /includes/modules/sideboxes/your_template/categories.php (copy it from /includes/modules/sideboxes/categories.php if it is not there already). Something like this (add the parts in red)
    Code:
    //the heading comments
    
    if (!$this_is_home_page) {
    
    //the module processing code
    
    }
    ?> (end of the file)

  5. #5
    Join Date
    Mar 2011
    Posts
    76
    Plugin Contributions
    0

    Default Re: How to Just turn off Categories on Front page ?

    Thanks,

    This is what i have but it still shows up , if I remove all and just put in your code it removes it from All pages.

    Sorry what am i doing wrong ?

    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 $
     */
    
        $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) {
    
    //the module processing code
    
    }
    
    
    ?>

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

    Default Re: How to Just turn off Categories on Front page ?

    Umm... you were supposed to put the parts in the places I described, not just paste the whole thing at the end of the file - that does nothing.
    The
    if (!$this_is_home_page) {
    goes in here:
    PHP Code:
     * @version $Idcategories.php 2718 2005-12-28 06:42:39Z drbyte $
     */

      if (!
    $this_is_home_page) {

        
    $main_category_tree = new category_tree
    and the
    }
    goes where you put at the end.
    The comment
    //the module processing code
    is a placeholder for all of the code in the middle of the file, not literal.

  7. #7
    Join Date
    Mar 2011
    Posts
    76
    Plugin Contributions
    0

    Default Re: How to Just turn off Categories on Front page ?

    Ahhh very new to this !

    Works a treat many thanks indeed for your help!

 

 

Similar Threads

  1. v139h How to automatically turn off sold out categories
    By joew36 in forum General Questions
    Replies: 4
    Last Post: 24 Jul 2015, 01:17 PM
  2. Turn off right and left columns front page only
    By cshart in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 24 Dec 2010, 04:24 AM
  3. Way to turn off bannerbox just on home page?
    By bottyz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Apr 2010, 01:37 PM
  4. Replies: 1
    Last Post: 2 Jun 2008, 05:16 PM
  5. How to turn off side box just on the main page?
    By lina0962 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Feb 2008, 03:49 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