Re: how would I make the categories expand?
That's fantastic. Thanks for your help.
One last option would be great. That if you click on a catagory or subcatagory, that catagory or the catagory that the subcat belongs to if the only one showing in the catagories box with a single "view all catagories" link at the very top to bring someone back to show all catagories.
I hope I make sense. I take it that's not possible yet?
Re: how would I make the categories expand?
It couldn't be achieved with the current available settings alone.
Switching from a "top + first subs" view when no cats have been clicked to some variety of "active tree only" view when a cat is active could be done in categories_dressing_defines.php by adding another case with appropriate coding to the cat_active_level_manage() function.
Getting the "view all" button when a cat is active would be trickier, and I would have to think about the best way to do that.
Re: how would I make the categories expand?
This may do the control you want. I have not tested it; try it and let me know if there is a problem.
PHP Code:
case 6://like 4, per level when none active
if($cPath_top == 0){
$test_level = 1;
break;
}
if($cPath_top == $path_top){
if ($cat_depth >= 2){//only test sub-subcats+
$path_ids = explode('_',$path);
$path_parent = $path_ids[count($path_ids)-2];
if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
}
} else {//if not active test for level
$skip_cat = 1;
}
break;
Re: how would I make the categories expand?
Thanks again. Where would I add this? I'm sure it's obvious but I know nothing about php.
Tim.
Re: how would I make the categories expand?
OK, edit /includes/functions/extra_functions/categories_dressing_functions.php, and add it after the "case 5" code block.
PHP Code:
case 5:// show active, no top, per levels
if ($cat_depth == 0 or $cPath_top != $path_top) {
$skip_cat = 1;
}else{
$test_level = 1;
}
break;
case 6://like 4, per level when none active
if($cPath_top == 0){
$test_level = 1;
break;
}
if($cPath_top == $path_top){
if ($cat_depth >= 2){//only test sub-subcats+
$path_ids = explode('_',$path);
$path_parent = $path_ids[count($path_ids)-2];
if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
}
} else {//if not active test for level
$skip_cat = 1;
}
break;
}//switch
Then edit the define with '6|0|1'.
Re: how would I make the categories expand?
It works perfectly. Amazing, thank you!
Re: how would I make the categories expand?
Glad it's working. Would you mind letting me see the site?
Re: how would I make the categories expand?
It's not a live site as you can see. There is still alot of work to be done and I have yet to change the colors in the menu. On that, is it possible to change the background color of a subcat only when it is active?
The right hand menu is also just temporary.
http://www.lowpricedhardware.ie/
Re: how would I make the categories expand?
You can highlight the current category path with these selectors (already in your stylesheet_chcategories_dressing.css):
#chcategories li a.cat-selected-text {}
#chcategories li a.cat-parent-text {}
Re: how would I make the categories expand?
Thanks yet again.
I'm sure I'm missing something very obvious but how do I change the font, and background color of the main cat headings? And the backgund color of the subcats?