About fetching children

About fetching children

Tuesday 12 May 2009 7:24:54 am - 3 replies

Author Message

Ivo Lukac

Tuesday 12 May 2009 8:50:49 am

You can try with priority. Set priority sorting for item objects and enter for example priority 0 to first object.
Then with fetch tree function filter only priority = 0.
This is just an idea, I didn't do it :)

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Jean-Luc Nguyen

Wednesday 13 May 2009 6:56:41 am

Hello,

When you have the items array, you can get its children, something like $items.children.0...

http://www.acidre.com

Michael Fürst

Thursday 14 May 2009 2:36:20 am

Hi,

Yeah, you are of course able to fetch only the items on level 1.
Here's my example of fetching the menu:

{def $menuTop=fetch( content, list, hash( 	
    parent_node_id, $indexpage,
    sort_by, array('priority',true), 
    class_filter_type, include,
    class_filter_array, array('frontpage','link','contentpage','event_calendar','blog','internal_shortcut','bildergalerie','folder')))
}

$indexpage is the node ID of the root node - in your case "level1".
Additionally you can use the "depth" parameter to define how many levels shall be fetched. http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list

Cheers,
Mike

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.