I’m letting my client change the menu-index, but at the moment it’s kinda really messy.
Like for example, if there are 10 pages, and I want the selected page to be the 5th, you’d change the menu-index to 5. But instead you have to change it to something like 9 before it’s the 5th.
I imagine this is from where pages are added/deleted.
Is there some kind of plugin or whatever to clean this up?
Your advice is appreciated, thanks
-
MODX Staff
- 10,725 Posts
The Document Manager module included with MODx comes with the ability to drag and drop the order of documents within a parent.
That would be good, how do I access that?
From inside the Manager :
Modules => Doc Manager => Sort Menu Items
If you mean the Document Id, that’s generated when the new page is inserted into the Database.
It’s not a good idea to get fixated about sequential Id’s.
Try to resist editing them in the Database it can have unforeseen consequences regarding Parents, Templates, Template Variables etc. etc.
No, sorry - I mean if you go here
ROOT/manager/index.php?a=112&id=1
It sends you to the page where you change the order of things, I need to know what Javascript I need to run through it to make it come up with one particular page.
Is this possible?
No, sorry - I wasn’t being clear.
I can make just that page come up, but it says "Click on the page you want in the tree to change the order of its children", or something along that lines. What I want is for it to come up straight away with, say, page-id 20?
The page is POSTed to get to a sorting page, you can’t use a GET var to arrive on a page ready to sort. Obviously you can change what the Doc Manager expects (POST to GET for "new_parent") but I wouldn’t know where to look to change that, prob under ’Manager Modules’.