You didn't say that you wanted that - try the built-in case 2:
PHP Code:
case 2://active only (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top) $skip_cat = 1;
break;
define('CAT_BOX_ACTIVE_LEVEL', '2|0|0');//full active tree only; only top cats when no cat selected
If what you want is to have no top cats showing when one is selected, you could modify case 2:
PHP Code:
case 2://active only, without top (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top or $path == $path_top) $skip_cat = 1;
break;
Bookmarks