The easiest way to do this is probably by adding a switch that suppresses output of any category that is not current and a subcat.
Find this line in /includes/templates/your_template/sideboxes/tpl_categories.php
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
$current_top = false;
if ((int)str_replace("cPath=","",$box_categories_array[$i]['path']) == $_GET['cPath']) { //top cat of path is active
$current_top = true;
}
above it, and
($current_top == false) or ($box_categories_array[$i]['top'] == 'true') or
inside it to get
PHP Code:
$current_top = false;
if ((int)str_replace("cPath=","",$box_categories_array[$i]['path']) == $_GET['cPath']) { //top cat of path is active
$current_top = true;
}
if (($current_top == false) or ($box_categories_array[$i]['top'] == 'true') 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 {
I haven't tested this yet, so try it and let me know how it works. If it needs tweaking, I'll take care of it.
Bookmarks