Help sorting menuitems

Author Message

akiL Mussa

Monday 04 April 2005 8:28:10 am

Hi,

I'm trying to use the top_menu sorted by priority using the following code:

    {let root_node=fetch( content, node, hash( node_id, 2 ) )
         menuitems=fetch( 'content', 'list', hash( 'parent_node_id', 2,
                                                   'sort_by', array('priority',true()) ) )}

I am getting the folders returned from my fetch, but not in priority order.

The root node (node_id 2) is ordered by priority. I'm using ezp 3.4.0. I just cleared all caches many times

Is there anything wrong?

Ɓukasz Serwatka

Monday 11 April 2005 5:32:40 am

Hi,

Try replace sort array with $node.sort_array and use admin interface to sort content.

{let root_node=fetch( content, node, hash( node_id, 2 ) )
         menuitems=fetch( 'content', 'list', hash( 'parent_node_id', $root_node.node_id,
                                                   'sort_by', $root_node.sort_array )}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.