Say the example below.
Level 1
-Level 2
-Level 2
---Level 3
---Level 3
-Level 2
Level 1
-Level 2
-Level 2
-Level 2
And say we're on the second level 2 page in the first level 1 options (I know I could have labeled better)
I'm wanting to avoid hard coding the Level 1 layer. Pretty much Levels 1 and 2 need to be expanded, but level 3 conditional on where you are. Any ideas?>
-
☆ A M B ☆
- 3,141 Posts
That will go up all the way from where you are to the top level resource. So if you're on level 2, it will give that class to level1 and level 2.
You can use that in your CSS like this..
li.active li.active ul {
display: block;
}
Of course that needs to be adapted to your actual structure but maybe this can get you started.