Is it possible for simple edit interface users to reorder assets? Our users have asked how they can reorder the navigation menu on their website, but it seems it can only be done through the back-end.
I don't think there's any attribute that we can sort by (not created date or aphabetical by title for example), it's an ability to arbitrarily shuffle the menu they want.
I actually just posted a Javascript function for this in the tips and tricks forum.
The function itself will do the heavy lifting of calling the asset map, and sending the new sort order. But, you will need to incorporate the function with some sort of an asset listing, with draggable items or such (or some sort of input field that lets the user set a new sort order for an asset). You just need to supply the function with the id of the asset to sort, the parent id, and the new sort order. So that users can re-sort items, and then it will call this jQuery function.
Let me know if you need help after looking at the function.
http://forums.matrix.squiz.net/index.php?showtopic=7203
Thanks Nic!
That looks really useful, I'll have a go and let you know how I get on.
Thanks for your help,
[quote]
Thanks Nic!
That looks really useful, I'll have a go and let you know how I get on.
Thanks for your help,
[/quote]
No problem. It uses jQuery, so just be sure to include that too.
Nic's example actually mirrors something we wrote to do the same thing. There are some improvements to the JS API being made at the moment, so we should soon be able to avoid having to write out the asset map xml.
Thanks guys, I have this functioning now.
Can you tell me how I'd get an Asset Listing to sort by the 'parent position' value? I want to build an interface, something like you suggested Nic. The ordering of the items in the menu_normal design area in my design is updating, but the Asset Listing still seems to be sorting by asset_id.
I'm looking forward to trying out the Javascript API if we upgrade (we're on 3.22.1). In the meantime can you point me to any documentation on the ?SQ_ACTION= parameters and commands? This looks like a great new avenue to exploiting Matrix.
[quote]
Thanks guys, I have this functioning now.
Can you tell me how I'd get an Asset Listing to sort by the 'parent position' value? I want to build an interface, something like you suggested Nic. The ordering of the items in the menu_normal design area in my design is updating, but the Asset Listing still seems to be sorting by asset_id.
I'm looking forward to trying out the Javascript API if we upgrade (we're on 3.22.1). In the meantime can you point me to any documentation on the ?SQ_ACTION= parameters and commands? This looks like a great new avenue to exploiting Matrix.
[/quote]
Set the asset listing to "No Sorting" and ensure that "Direct Links Only" is set to Yes.
[quote]
Set the asset listing to "No Sorting" and ensure that "Direct Links Only" is set to Yes.
[/quote]
Just make sure that the assets that you are listing ARE direct children, or, they won't be listed when setting it this way.
Thanks guys, my asset listing is now behaving how I want it to.
[quote]
Thanks guys, my asset listing is now behaving how I want it to.
[/quote]
Glad to hear it. Once you have the implementation finished, you should show us a demo video!