Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

fetch( 'content', 'tree' )

The fetch function tree of the content module: 20 parameter(s), 1 required.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/fetch-functions/content/tree.md

On this page

fetch( 'content', 'tree' )

Defined in kernel/content/function_definition.php; it calls eZContentFunctionCollection::fetchObjectTree() (kernel/content/ezcontentfunctioncollection.php). Operation type: read.

Parameters

ParameterTypeRequiredDefault
parent_node_idintegeryes
sort_byarraynoarray()
only_translatedboolnofalse
languagestringnofalse
offsetintegernofalse
limitintegernofalse
depthintegernofalse
depth_operatorintegernofalse
class_idintegernofalse
attribute_filtermixednofalse
extended_attribute_filtermixednofalse
class_filter_typestringnofalse
class_filter_arrayarraynofalse
group_byarraynofalse
main_node_onlyboolnofalse
ignore_visibilityboolnofalse
limitationarraynonull
as_objectboolnonull
objectname_filterstringnonull
load_data_mapboolnonull

Example

In a template (the values are placeholders of each parameter's type):

{def $result = fetch( 'content', 'tree', hash( 'parent_node_id', 1 ) )}
{* with every parameter *}
{def $all = fetch( 'content', 'tree', hash( 'parent_node_id', 1,
                                       'sort_by', array(),
                                       'only_translated', true(),
                                       'language', 'language',
                                       'offset', 1,
                                       'limit', 1,
                                       'depth', 1,
                                       'depth_operator', 1,
                                       'class_id', 1,
                                       'attribute_filter', $attribute_filter,
                                       'extended_attribute_filter', $extended_attribute_filter,
                                       'class_filter_type', 'class_filter_type',
                                       'class_filter_array', array(),
                                       'group_by', array(),
                                       'main_node_only', true(),
                                       'ignore_visibility', true(),
                                       'limitation', array(),
                                       'as_object', true(),
                                       'objectname_filter', 'objectname_filter',
                                       'load_data_map', true() ) )}

In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):

$result = eZFunctionHandler::execute( 'content', 'tree', array( 'parent_node_id' => 1 ) );

Generated by ./console exp:help:examples from kernel/content/function_definition.php, kernel/content/ezcontentfunctioncollection.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x