Forums / General Questions / How to create new category without displaying it's link?

How to create new category without displaying it's link?

Locked

Views: 1,028

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
22 Aug 2008, 2:41 PM
#1
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

How to create new category without displaying it's link?

I would like to create a new category but I don't want the link for that new category to appear in the categories sidebox. I want to place its link to other place.

Is it possible to disable that new category link from the categories sidebox? Thank you.

- Nothing is impossible. Some things are just less likely than others. -

22 Aug 2008, 2:48 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to create new category without displaying it's link?

There's a 'Hide Categories' mod in Downloads, but I'm not sure how it works.

22 Aug 2008, 3:36 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: How to create new category without displaying it's link?

It would function to hide the new category from everybody except customers you give the link to (if any). It might be overkill for this application, though - you just want the category name to not appear in the sidebox, if I understand correctly.

For that you could edit /includes/templates/your_template/sideboxes/tpl_categories.php. Find this near the top:```php
if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {

and add

$box_categories_array[$i]['path'] == 23 or

to the if statement to get```php
    if ($box_categories_array[$i]['path'] == 23 or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
      // skip if this is for the document box (==3) 
    } else {

Change 23 to the cPath for your category.
This code will skip display of that category in the categories sidebox.

23 Feb 2009, 1:00 AM
#4
triplexxx avatar

triplexxx

New Zenner

Join Date:
May 2008
Posts:
31
Plugin Contributions:
0

Re: How to create new category without displaying it's link?

Glenn

how can i hide 2 categories this code hide one but i need to hide 2 categories