We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43864
    • 151 Posts
    Hey, I have a list (resources) of more then 20 items. I want to list this in a menu, but in 4 columns, with wayfinder. So 5 items per column.

    This is not a fixed menu, so it's not always 20 items and the ID's of the resources can change, but there must be always 5 items per column. If there are for example 6 menu-items, then the 6th menu-item should be in de second column.

    So if I have for example 17 menu-items --> 5 | 5 | 5 | 2

    Can this be done with wayfinder? Must work in all browsers (I say this in case there's css3 involved)

    Thanks for help.
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Sort your resources in the resource tree according to the columns you want. Create a holding resource (hidden) and use that as a starting ID for the menu in Wayfinder. Style the menu with css as you want it. CSS won't sort for you, the resource tree order does that for you, so you can do what you like with CSS.

      When you add resources to this menu, just make sure you only put five into each (hidden?) parent resource that has 5 children.

      It doesn't look like there's a Wayfinder property for including specific resource ID's, else you might be able to include a comma separated list in the call (there's an exclude ID's property though). Without that available, the only way I can see to maintain 5 items for each column is to sort your resources in the tree manually.


      Edit: Or, use GetResources instead of Wayfinder.


      [ed. note: frogabog last edited this post 14 years, 3 months ago.]
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 43864
        • 151 Posts
        For now I will use the method you say, but I hope there's another way (in the future) to handle this. Thx.
          • 22840
          • 1,572 Posts