This is easy to do, and has been discussed here before.
In /includes/templates/your_template/sideboxes/tpl_categories.php, find this
PHP Code:
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
substr_count($box_categories_array[$i]['path'],'_') = 0 or
to the if test to get this
PHP Code:
// subcat limit 2007-12-20
if (substr_count($box_categories_array[$i]['path'],'_') = 0 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 {
The number of underscores in $box_categories_array[$i]['path'] indicates the category level, with 0 being a top cat.
The code can also be used to hide lower level subcats, with
$box_categories_array[$i]['path'] > 1
Your subcats will still display as subcats, though (with indents etc.); is there a reason you need to keep cats and dogs separate if you don't want to show them as top-level groupings?
You would need the Expanded Category List mod from Downloads in order to show all of the subcats and not just the ones in the current selected top cat.
Bookmarks