That is an inherent problem with filtering category display by active category: when not in a category-type page, there is no active category, so no way for the system to decide what to display.
This is a deep structural problem, as the category display filtering is happening on a list generated anew with each page view, and simply setting a global variable in tpl_categories.php won't put the proper subcategories in the list to be filtered.
It may be possible to change the system behavior to remember the previous list unless on a category page or home page, but that is a part of the code where I have never ventured and wouldn't know what the ramifications of changes might be.
This line in tpl_main_page.php ```php
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_disable_right = true;
}
```php
// the following IF statement can be duplicated/modified as needed to set additional flags
$flag_full_cat = false;
if (in_array($current_page_base,explode(",",'list_pages_to_show_regular_categories_menu_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_full_cat = true;
}
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) or (!ereg("_",$cPath) and !$box_categories_array[$i]['current'] and !$flag_full_cat)) {
// skip if this is for the document box (==3) or non-current top cat(_, current) & not in full cat list
} else {