Share » Forums » Setup & design » Custom Sort Order of Menu Items

Custom Sort Order of Menu Items

Custom Sort Order of Menu Items

Tuesday 06 July 2004 6:03:24 am - 2 replies

Author Message

Alex Jones

Tuesday 06 July 2004 7:03:16 am

When using the Admin interface, edit the container folder that holds the objects that you want to re-order. Then choose to sort by <i>Priority</i>. Once you've saved the changes, you should see a new text field under the heading <i>Priority</i> next to each of the folders you mentioned. You can now set a specific order by numbering them in the order that you would like them to show up and clicking on <i>Update</i>.

Documentation: http://ez.no/ez_publish/documentation/day_to_day_use/sorting_content

Does that help?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Gustave Stresen-Reuter

Tuesday 06 July 2004 7:49:35 am

That helped a lot and I actually even figured it out before I received your reply. However, I found that I had to set the sort in the template in order to get it to take. Specifically, I had to change:

{let children=fetch('content',list,hash(parent_node_id,2))}

to

{let children=fetch('content',list,hash(parent_node_id,2,'sort_by',array('priority',true())))}

That doesn't seem like the right approach, however, as the whole point of this system is to allow people to set such things as sort order without having to touch the code, no?

Any idea why I had to resort to modifying the template? I'm using eZ 3.2-6...

Ted

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu