I was working on a site this morning and came across a little tip with the ManagerManager snippet that I thought would be worth sharing.
Whenever I set up a Template Variable (TV) I often wish that I could move the TV fields up above the content area inside the Edit Resource page. If there are just one or two TV fields I feel like the end user won’t always scroll all the way down to see the additional fields below.
What I have noticed is that when using the ManagerManager mm_moveFieldsToTab function, the fields will reorder based on their order inside of the actual function call. So, if you identify the general tab and state your fields (even the standard, default fields) in the order you would like them they will display accordingly. See example below:
mm_moveFieldsToTab('pagetitle,description,longtitle,tvnewsImage,content', 'general');
Note
Please see the post comments that there may be an inconsistency with this technique, at least with the placement of the menuindex field.



Great tip, Greg. Thanks a lot for sharing. That's exactly what I was searching for weeks now and could not find a proper answer.
January 21st, 2010 at 10:30 pm
Very cool…I've wondered about this as well…thanks! Very helpful…
January 22nd, 2010 at 1:52 am
Today I tested this and it works great, but I’m facing one little problem: After “reordering” fields, the menuindex field is always displayed on top of all other fields – no matter where I place it in the function call.
The function call itself looks like this (whereas “download-file” is one of my template variables and the rest of the fields is hidden):
mm_moveFieldsToTab('pagetitle,download-file,template,parent,menuindex', 'general', '', '6');
January 22nd, 2010 at 2:33 pm
That's interesting, I didn't see that because I was hiding that field from the user anyway. I then use the Module/Doc Manager to order/reorder the pages.
I was able to replicate what you found. The menu index does move above any field listed in that function, but if you remove a field (like pagetitle, it will move ahead of the menuindex). I am not sure how to classify this behavior (annoying?) since this is not really the intended use of this feature.
I have sent a note to ncrossland (the snippet author) informing him of this behavior. I will post if I receive any other information on this.
January 22nd, 2010 at 3:00 pm
This was ncrossland's response:
” Hi Greg
Thanks for sending me the link to the post — very good use of MM, I hadn't thought of it in this way to reorder the fields.
The menuindex field has always been a little tricky to deal with because it is uses a different layout to most other fields (because it has “show in menu” checkbox alongside it, and the < > controls). I specifically excluded it from working with some functions because it broke the layout badly – I'm not sure if this is the case here. It's nothing that isn't fixable, now I know it's important to people.
I've filed this as a bug in Jira so I don't forget about it for the next version: http://svn.modxcms.com/jira/browse/EXT-28 “
January 22nd, 2010 at 3:54 pm
Well , the view of the passage is totally correct ,your details is really reasonable and spring-bags.com you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!
June 8th, 2010 at 3:26 am