Active parent category when sub-category selected?

babystar

No avatar

2007-06-06 19:15

Is there any way of making the parent category in a list 'active' when you select a sub-category?

I may use a bit of code that goes a bit like this:
if ($p == "34"){echo "class=\"active\"";}

for the main menu item (e.g category id = 34) but how can I get this to stick when I'm browsing a sub category?

Thanks!

» Quick.Cart v2.x

treewood (OpenSolution)

Avatar: treewood

2007-06-06 20:54

babystar - maybe translate to me better. You want to select main/parent category when someone chose it subcategory?
For example there is:
Notebooks (main category)
> Apple (subcategory)
> IBM (subcategory)

And when Apple or IBM was choosen then Notebooks must be selected too?

babystar

No avatar

2007-06-07 11:59

Yes, exactly.

But I have some custom graphic tabs I've made for the list and it will only have about 8 of the main categories (out of 11). Therefore I was going to explicitly choose them with the 'if ($p ==' code rather than use the inbuilt list building functions.

The specific sub menu will appear elsewhere on the screen.

But when I click on 'Apple' as above I also want to set the main category to 'active'. I can't use the 'if ($p ==' code anymore as the category has changed.

treewood (OpenSolution)

Avatar: treewood

2007-06-07 16:24

babystar - now i dont understand :/ please send maybe some screenshots and link to Your page to give You advice

sonicaigar

Avatar: sonicaigar

2010-08-13 07:27

Hi treewood!

I like your example. Please tell me, how to do that. I use Quick.CMS v2.5
For example there is:
Notebooks (main category)
> Apple (subcategory)
> IBM (subcategory)

And when Apple or IBM was choosen then Notebooks must be selected too :)

boboo

Avatar: boboo

2010-08-13 10:50

Eaah,
if you had the QC 3.x...
I suppose you mean something like this:
http://skupienie.kimla.de
then click in left menu: Tarcze
then: Ppn
then: Trening
As you can see, the parent- and "grandparent" menus are open & selected.
(in this solution I can chose between "opened" or "selected"or both)

http://skupienie.kimla.de/

sonicaigar

Avatar: sonicaigar

2010-08-13 11:48

yes, boboo. That is exactly, what i meant. How did you do that?

boboo

Avatar: boboo

2010-08-13 14:00

On my site you can see the "kontakt" form in the upper menu.
Just use it ;-)
(fill the captcha input under the form [Wpisz kod])

http://skupienie.kimla.de/

Back to top
about us | contact