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

    Does anyone know of a funktion to bulk or mass change the menuindex ?

    My problem, I have a snippet that relies on the menuindex being correct e.g 0, 1, 2 etc..

    The site I am working on has a main folder with approx. 800 documents, these pages/documents have been brought in from other folders etc. and have the wrong menuindex or have the same menuindex as other files in the same folder.

    An example: 5 docs have menuindex "12", tons of docs have menuindex "0"

    All help/advice appreciated, cheers smiley

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Hmm. The DocManager module has a drag-and-drop menuindex ordering feature, but even that would be a bit much for 800 resources.

      Are you sure that the menuindex is that important? Wayfinder, Ditto and friends can be given parameters to order by other fields, such as create date or edit date. Even the resource tree can be re-ordered using other fields.



        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 13226
        • 953 Posts
        Hi Susan

        Ive just got out of bed smiley

        We came up with a solution at 3.30 (GMT) this morning - we have remodelled a snippet to fit.

        I was looking to keep with the original snippets and long standing 3rd party snippets, keeping away from bespoke work, as updates & modifications are always a problem if you no-longer work for a client.

        With the original MODx snippets, they are updated by the core development team, which is obviously good for the client.

        The main problem is with Ditto’s URL parameters = ?start=10 or ?start=0

        Using PrevNext navigation on a landing page gave you the result that you were always taken to the parent page (domainname.com/parent.php) and not to the real page (domainname.com/parent.php?start=40).

        So the problem was to sync prevnext with ditto - ASC & DESC etc.. and this caused problems when menuindex was wrong - and as this is for a client, I wanted it to be as easy as possible, so using any other elements wasn’t a choice. ID could have been used, but that caused problems as well.

        So, a rewrite of the prevnext snippet took place (by a friend of mine) and now it seems to work.

        Thorough testing will be completed this weekend.

        Cheers