Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Plugin Contributions
    0

    Default How to show a category only on sidebox and not in top menu?

    Hi
    Is there a way to have a category showing only on sidebox and not on top menu? When I add a category it show in both places but my clients want to add some categories that show only on left sidebox.
    Thanks for you help

    Hamidz

  2. #2
    Join Date
    Jan 2010
    Location
    Australia
    Posts
    239
    Plugin Contributions
    1

    Default Re: How to show a category only on sidebox and not in top menu.

    go to admin>>configration>>layout settings>>categories tab menuon/off>> value to zero

  3. #3
    Join Date
    Feb 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: How to show a category only on sidebox and not in top menu?

    This will hide all categories from tabs and it's not what I want. I want to hide some of them only to hide from tabs and show only on sidebox.

    Let's say I have Canon, Dell, Epson, Samsung that show on tabs and sidebox. I want Samsung to be hide from tabs and show only on sidebox.

    Thanks
    Last edited by hamidz; 2 Mar 2010 at 03:22 AM.

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

    Default Re: How to show a category only on sidebox and not in top menu?

    First you need to know the category id for Samsung. Say it is 23, for example.

    In /includes/modules/your_template/categories_tabs.php, find this section
    PHP Code:
    $links_list = array();
    while (!
    $categories_tab->EOF) {

      
    // currently selected category
      
    if ((int)$cPath == $categories_tab->fields['categories_id']) {
        
    $new_style 'category-top';
        
    $categories_tab_current '<span class="category-subs-selected">' $categories_tab->fields['categories_name'] . '</span>';
      } else {
        
    $new_style 'category-top';
        
    $categories_tab_current $categories_tab->fields['categories_name'];
      }

      
    // create link to top level category
      
    $links_list[] = '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' $categories_tab_current '</a> ';
      
    $categories_tab->MoveNext();

    and add a test
    if ($categories_tab->fields['categories_id']) != '23'){ //change 23 to your Samsung category id

    }
    PHP Code:
    $links_list = array();
    while (!
    $categories_tab->EOF) {

      if (
    $categories_tab->fields['categories_id']) != '23'){ //change 23 to your Samsung category id
      // currently selected category
      
    if ((int)$cPath == $categories_tab->fields['categories_id']) {
        
    $new_style 'category-top';
        
    $categories_tab_current '<span class="category-subs-selected">' $categories_tab->fields['categories_name'] . '</span>';
      } else {
        
    $new_style 'category-top';
        
    $categories_tab_current $categories_tab->fields['categories_name'];
      }

      
    // create link to top level category
      
    $links_list[] = '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' $categories_tab_current '</a> ';
      }
    //Samsung
      
    $categories_tab->MoveNext();


 

 

Similar Threads

  1. Replies: 4
    Last Post: 1 Jul 2015, 06:51 PM
  2. v153 Always show Subcategories, or different categories in sidebox and top menu?
    By BlackOrchidCouture in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 5 Dec 2014, 05:19 PM
  3. v139h HOW TO Show only current category in categories sidebox?
    By obrien48 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Jan 2012, 04:45 AM
  4. Replies: 3
    Last Post: 2 Dec 2010, 09:52 AM
  5. Click on Category in Sidebox and Only Open Sub-Cat In Sidebox, Not In Main Store
    By bamalama in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 17 Dec 2006, 04:45 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