Forums / General Questions / How to show a category only on sidebox and not in top menu?

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

Locked

Views: 935

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
1 Mar 2010, 10:13 PM
#1
hamidz avatar

hamidz

New Zenner

Join Date:
Feb 2010
Posts:
14
Plugin Contributions:
0

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 Mar 2010, 12:07 AM
#2
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

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

Believe it or not But My existence is illusional

2 Mar 2010, 2:16 AM
#3
hamidz avatar

hamidz

New Zenner

Join Date:
Feb 2010
Posts:
14
Plugin Contributions:
0

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.:dontgetit

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

2 Mar 2010, 2:56 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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
$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();
}

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

}
```php
$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();
}