-
Re: Categories Dressing
In categories_dressing_functions.php, add a new case to the switch in function cat_active_level_manage($path):
PHP Code:
//alternate case for Berserker 20110207
//The main categories are already set up with all the subs and sub-subs using ch_categories.
//Just need to be able to show on the top cats on homepage and pages that are not category or product.
case 6://full tree (only all tops when no cat selected)
if($cPath_top == 0) $test_level = 1;
break;
Then set the parameters:
PHP Code:
define('CAT_BOX_ACTIVE_LEVEL', '6|0|0');//show only top cats when no cat selected
Alternatively, adding the flyout rules would get the sidebox compact on all pages.
-
Re: Categories Dressing
By the way, if you only want the currently selected top cat to fully expand, you can use the built-in case 3, and set the define like this:
PHP Code:
define('CAT_BOX_ACTIVE_LEVEL', '3|0|0');//full active tree; only top cats when no cat selected
-
Re: Categories Dressing
Hello,
Tried both settings and case 3 is the best to what we need. But how can I stop the other top categories from displaying when a category is selected? You can check the site for the changes made.
Thanks
-
Re: Categories Dressing
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;
-
Re: Categories Dressing
Hello,
AWESOME!!!!! The following code does it:
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;
The code below did not work though but does not matter :)
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;
Thank you so much for taking the time to help! Much appreciated!
Must say, you have some of the best mods here. Also using EZ Pages Footer Columns and Model List.
Thanks again!!! :)
-
Re: Categories Dressing
Hello Glen, and everyone else. I've googled away and searched upon searched, and feel like this question has been asked, but maybe not with regards to this mod (which is awesome btw).
I want to completely eliminate my navBreadCrumbs bar, but the only way this makes sense for me to do is if people can still know where they are. I've found out how to highlight active subcategories, and have done this on my local server by using the following lines -
/*change bullet when a category w/o bg image is open to products:*/
#categories li a.cat-selected-text {
color:#990033;
}
My subcats locally have no background images, so this is pretty obvious.
My main concern is a way to keep the current category with a different or highlighted image button. here's my site (currently no subcats) -
http://www.niqfashion.com/theshop
Each category is in its own group per the defines file, and each has its own image and hover property per the css file. Is it possible to keep that hover image ON when that category is selected?
Thanks,
Nick
-
Re: Categories Dressing
Add the selector in red if you want to use the hover state for the selected state.
Add the rule in green instead if you want to use a different image.
Code:
#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}
#categories li a.catBg2:hover, #categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2hover.gif);
background-repeat:no-repeat;
}
#categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2selected.gif);
background-repeat:no-repeat;
}
-
Re: Categories Dressing
awesome, thanks so much!
I was trying
categories li a.catBg1:active, and then
categories li a.catBg1:selected
:S But what you wrote worked perfectly. Guess I shoulda interpreted it from the Subcats code in the css file...
Thank you!
-
Re: Categories Dressing
Note: the :active pseudo-class does not mean "current page link", but refers to the link state after being clicked and before the page refreshes. This used to be a noticeable lag (and an indication that something was actually happening was useful), but it is mostly irrelevant now with faster connections and computers.
-
Re: Categories Dressing
hehe I did notice that and realized afterwards. That's when I tried my version of the 'selected' class.
Thanks again!