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_count' )

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

Download as PDF

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

On this page

fetch( 'content', 'tree_count' )

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

Parameters

ParameterTypeRequiredDefault
parent_node_idintegeryes
only_translatedboolnofalse
languagestringnofalse
class_filter_typestringnofalse
class_filter_arrayarraynofalse
attribute_filtermixednofalse
depthstringnofalse
depth_operatorstringnofalse
ignore_visibilityboolnofalse
limitationarraynonull
main_node_onlyboolnofalse
extended_attribute_filtermixednofalse
objectname_filterstringnonull

Example

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

{def $result = fetch( 'content', 'tree_count', hash( 'parent_node_id', 1 ) )}
{* with every parameter *}
{def $all = fetch( 'content', 'tree_count', hash( 'parent_node_id', 1,
                                             'only_translated', true(),
                                             'language', 'language',
                                             'class_filter_type', 'class_filter_type',
                                             'class_filter_array', array(),
                                             'attribute_filter', $attribute_filter,
                                             'depth', 'depth',
                                             'depth_operator', 'depth_operator',
                                             'ignore_visibility', true(),
                                             'limitation', array(),
                                             'main_node_only', true(),
                                             'extended_attribute_filter', $extended_attribute_filter,
                                             'objectname_filter', 'objectname_filter' ) )}

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

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

In a shipped template

The first use in the templates of this installation, design/admin4/templates/content/dashboard.tpl line 55:

{set $day_count = fetch( 'content', 'tree_count', hash( 'parent_node_id', 1, 'attribute_filter', array( array( 'published', 'between', array( $day_from, sum( $day_from, 86399 ) ) ) ) ) )}

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