We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37144
    • 5 Posts
    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?>
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      &hereClass=`active` 


      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.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 37144
        • 5 Posts
        Yeah, this was pretty obvious. Thanks, it worked perfect. I was thinking in code output, not transformation smiley