Fetch Children

Fetch Children

Monday 19 February 2007 6:39:44 am - 3 replies

Author Message

Nabil Alimi

Monday 19 February 2007 8:54:20 am

Hi,

Which content do you want to retrieve ? How would you like to sort it ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Softriva .com

Monday 19 February 2007 9:46:09 am

oooooops,

sorry, I want to fetch the news1, news22, news14, etc.

Damarev .

Monday 19 February 2007 6:45:29 pm

This could be a simple solution:

{def $current_folder=fetch( 'content', list, hash( 'parent_node_id', 65,
'limit',1,
'attribute_filter', array( array( 'folder/name','=',$CurrentYear))
}

{def $last_folder_id=$current_folder[0].node_id}

{def $latest_news=fetch( 'content', list, hash( 'parent_node_id', $last_folder_id,
'sort_by', array( 'published', false() ),
}

I know this is not the perfect approach, but it works.

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

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