We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 897
    • 1,620 Posts
    oh! and me need this stuff. thanx for link!
      "Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."

      Не используйте Revo для "просто сайтов". Используйте Evo

      Who can defeat the Russian bear?
      • 33706
      • 51 Posts
      Finally it works; here is the code for newbies..like me.

      <div id="top_menu">
      [[DropMenu? &levelLimit=`1` &hereClass=`active_top`]]
      </div>
      
      <div id="sub_menu">
      [[DropMenu? &maxLevel=`1` &startDoc=[[UltimateParent]] &hereClass=`active_sub`]]
      </div>
      
      <div id="content">
      <h3>[*longtitle*]</h3>
      [*#content*]
      </div>


      Now let’go further...
      When I click on the top level menu, I want the page from the first position of the sub level menu displayed automaticaly.

      After all that will make a nice tutorial to share.

      Michel
        • 17883
        • 1,039 Posts
        Hi just use this snippet for that. Put the call for it in the content field of the folder which has the documents inside.
          • 6726
          • 7,075 Posts
          I think this is all a bit complicated... of course there is the CSS method, which I would favor...

          I thought I had seen somewhere that you could use StartDoc=`[*id*]` and have a context dependent submenu... I can’t seem to find it...

          What I did find though is the DropMenu hack posted by Dernier_recours :
          http://modxcms.com/forums/index.php/topic,4095.msg29959.html#msg29959

          Probably much simpler !

          Quote from: _michel_ at May 08, 2006, 05:09 AM
          What is erm?

          michel, "erm" is not a MODx term, it’s english for "euh" in french wink
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 18830
            • 161 Posts
            Quote from: _michel_ at May 08, 2006, 10:20 AM

            <div id="sub_menu">
            [[DropMenu? &maxLevel=`1` &startDoc=[[UltimateParent]] &hereClass=`active_sub`]]
            </div>


            I was glad to find this because I’m in doubt that hiding submenus with help of some CSS is an accesible solution. Just turn off the CSS on modx-Website take a look at the main menu and you know what I mean. Yes, it is valid XHTML. But the menu-list is pretty long for screen readers an so on.

            So I tried UltimateParent and also the above mentioned hack of DropMenu, to hide and show the submenus in a structure like this.

            - item1
            -- subitem1
            - item2
            -- subintem2

            Well, when I clicked "item2" everything was all right. The menu looked like this.

            - item1
            - item2
            -- subintem2

            But when I clicked "item1" this happend:

            - item1
            - item2
            -- subitem1

            Hm. And the code isn’t far from perfect too - two lists but not nested.

            Has anyone an idea?


            Mazso
              • 7923
              • 4,213 Posts
              Wayfinder has an option to hide submenus built in.. maybe try that?


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 18830
                • 161 Posts
                Quote from: doze at Aug 24, 2006, 01:20 AM

                Wayfinder has an option to hide submenus built in.. maybe try that?

                Thank you, Doze. That looks pretty cool. I’ll give it a try.
                  • 7455
                  • 2,204 Posts
                  I often use listchildorsibs or dropmenu in comination with ultimateparent or sectionroots.
                    follow me on twitter: @dimmy01
                    • 18830
                    • 161 Posts
                    Quote from: Dimmy at Aug 27, 2006, 06:30 AM

                    I often use listchildorsibs or dropmenu in comination with ultimateparent or sectionroots.

                    In the meantime I tested wayfinder - it’s really a great snippets. No fiddling around with several snipptes and some weird HTML-Code. Your should give it a try, Dimmy.