Sébastien Antoniotti
|
Tuesday 13 March 2007 7:57:08 am
Hi, In my eZ publish site I have 3 classes (artist, album and song) and wich of them have an attribute named "name". So I would like to fetch all objects (nodes) of these 3 classes and order them on their "name" attribute first, and not on the class ID. Example : Considering that under the node 59 we have this :
- Toto (instance of class artist)
- Tata (instance of classe song) - Tutu (instance of classe album) I would like to make a fetch that give me this order :
1) Tata
2) Toto 3) Tutu Thanks in advance !
eZ Publish Freelance
web : http://www.webaxis.fr
|
Felix Woldt
|
Monday 26 March 2007 11:01:10 am
Hi Sebastian, have a look here http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list you can sort your fetch after 'name'
{fetch( 'content', 'list', hash( 'parent_node_id', 42,
'sort_by', array( array( 'name', false() ), array( 'published', false() ) ,
'class_filter_type', 'include',
'class_filter_array', array( 'class_identifier_1', 'class_identifier_2' , 'class_identifier_3' ) ) ) }
This code should be work. Felix
http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com
CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter
|