We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38593
    • 129 Posts
    I am wondering about the ordering of menus using the "Menu Index" value for a document.

    If I have 12 pages that I am including within a menu, do I need to assign menu indexes of 1 through 12? Or can I assign them a value of 1 through 4 based on priority and let MODX sort out the sequence of pages within group indexed 1, group indexed 2, etc?

    The reason I ask is if I add another page, with the 1 through 12 system, I would have to go in and re-number every document, if the new doc was destined towards the top of the menu.

    Assuming I can assign based on only 3 or 4 groups, am I safe in assuming the MODX would order within group 1 based on the document number in the tree? Or huh
      Pedalers Bicycle Tours my website forged with MODX
      vandergraaf-M static website generator for MODX
      • 31946
      • 116 Posts
      The menuindex defines the sorting of the Documents inside a Level.
      You normally don't have to set a menuindex - when you create a new Document, it gets the next higher menuindex according to your latest Document. You can also Drag & Drop your Documents inside the tree and the menuindex of all Documents is computed by modx automatically - you don't have to re-number them.

      If you need Groups, you may want to group your Documents under another Parent-Resource - acting as a folder.
        • 38593
        • 129 Posts
        Thanks Wanze. I hadn't noticed the numbering changing. That makes it easy enough.


        Now all I have to do is get Wayfinder to work. I get nothing showing on my test pages. The menu is a simple sidebar list.

        I downloaded and installed it through the package manager.

        Inserted the following in my page template:
        [[Wayfinder? &startid=`0` &outerTpl=`outerTpl` &rowTpl=`rowTpl` &hereTpl=`hereTpl`]]


        My outerTpl is:
        <span class="f95">
        <ul>
        [[+wf.wrapper]]
        </ul></span>


        My rowTpl is (the bit between gen-nav and href is supposed to be ascii &nbsp and &#8226)
        <li class="gen-nav"> • <a href="[[+wf.link]]" title="learn more">[[+wf.linktext]]</a></li>


        My hereTpl is (and some ascii as above between li and +wf):
        <li class="gen-nav-actv"> « [[+wf.linktext]]</li>


        [ed. note: mrcycling last edited this post 14 years, 5 months ago.]
          Pedalers Bicycle Tours my website forged with MODX
          vandergraaf-M static website generator for MODX
          • 22427
          • 793 Posts
          <span class="f95">
          <ul>
          [[+wf.wrapper]]
          </ul></span>
          Some observations:
          1. span is a inline element and can not contain a block element like ul.
          Just leave out the span and take <ul class="f95">.
          2. Is there only one level in the menu? (Otherwise you want the placeholder [[+wf.wrapper]] in the rowTpl and hereTpl too.)
            • 38593
            • 129 Posts
            Thanks Ottogal ... the span was leftover from when the list was simply links, guess we missed moving the class to the ul when we switched. But the list displayed as expected when hardcoded.

            And yes it is only a one level menu. The Wayfinder powered menu will only show pages within a specific category, our main navigation flyout is hardcoded because it has too much beyond simply links to pages within the modx site.

            Of course this all assumes I can figure out what I did wrong and can get Wayfinder to work. [ed. note: mrcycling last edited this post 14 years, 5 months ago.]
              Pedalers Bicycle Tours my website forged with MODX
              vandergraaf-M static website generator for MODX
              • 38593
              • 129 Posts
              Can someone say typo ... It was a
              startid=`0`
              when it should have been a
              startId=`0`
                Pedalers Bicycle Tours my website forged with MODX
                vandergraaf-M static website generator for MODX