We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39012
    • 2 Posts
    Hi,

    Having read the documentation and trawled google for a while I can't find an answer to what I thought would be an easy question and hope someone can help as I may be missing the woods for the trees.

    I have 10 resources, all top level so none have child elements and I want to display a menu of pages 6 through 10, is there a way of doing this without using &excludeDocs?

    [[!Wayfinder? &startId=`0` &excludeDocs=`1,2,3,4,5` ]]


    The above works but I thought there would be an easy way of specifying a range of resources from the top level.

    Have to say I found &startId really confusing - to me intuitively it looks like
    [[!Wayfinder? &startId=`5`]]
    would be what I wanted - in other words "build a menu starting from resource ID 5" but it actually means "build a menu starting with the children of ID 5", as ID 5 in my case has no children nothing displays.

    I can't find anything else in the docs and all the forum questions seem to be about multi level menus and not something this straight forward.I am planning on around 30 top level menu items for a project and will require different pages to show set ranges of pages like 2 through 7, 9 through 16 etc and can see &excludeDocs becoming something of a labour.

    Thanks.
      • 19369
      • 1,098 Posts
      I think you can't do this without &excludeDocs. Without &excludeDocs you would have to change the structure of your website, so group the resources and use &startId or use the snippet UltimateParent (you need to download it from the repository).
        • 22427
        • 793 Posts
        I would indeed think about restructuring the site, because having 30 top level menu items can be rather uncomfortable to handle for the user.
          • 22019
          • 390 Posts
          If you don't need to display children then use getResources to output the list of items you need - it allows for more complex criteria (in this case &parents=`0` &offset=`5`) or several other ways of achieving what you want.

          Another common way to do what you describe in the first post (using Wayfinder) is to tick the 'Hide from menus' option on the resources that you don't want in the top level menu.)
            Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
            • 39012
            • 2 Posts
            Thanks guys, &excludeDocs it is then.

            I can't group them using parents as I need menus where resources would then be spread across different parents.

            getResources may become a bit difficult, I've found the example menus for this quite hard to follow and am planning to add some resources with children later on.

            I don't want to tick the box to hide any of the items from menus as all of them will be used at some point to display in a menu.

            Also I am the user for this project so no issues in terms of ease of use, the users I have who need access to arrange their own menus will be staying put on their Joomla sites for the time being!