Friday 21 January 2011 9:04:22 am
Hi guys, I've an array in ini file that contains the node ID of contents to display in one page. Something like this:
[PLPMenu]
MenuArray[]
MenuArray[]=121
MenuArray[]=60
MenuArray[]=61
MenuArray[]=62
MenuArray[]=63
MenuArray[]=111 To retrieve the content nodes, I've used the following code: {def $menu = ezini('PLPMenu', 'MenuArray', 'plp.ini')}
{def $menu_items = fetch( 'content', 'node', hash( 'node_id', $menu ))}
It works fine but I need to preserve the order of nodes. The fetch function, instead, returns the nodes ordered by node ID. It returns the nodes in the order 60, 61, 62, 63, 111, 121 but I need the array order. How can I preserve the right order of nodes?
|