Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Generates debug statistics for a block of template code.


{debug-accumulator [ id=id ] [ name=name ]}


id string A unique identifier string for an accumulator. No.
name string A name that will be used in the debug output. No.


This mechanism generates some debug statistics based on the code that is encapsulated by "{debug-accumulator}" and "{/debug-accumulator}". The encapsulated code will be processed normally. The number of calls, total time and average time will be shown in the debug output.

The "id" and the "name" parameters are optional. The "id" parameter can be used to uniquely identify one accumulator. This means that if the same accumulator is used at multiple locations, the values will be accumulated and appended. The "name" parameter can be used to assign a name which will be used in the debug output.


Example 1

{def $nodes=fetch( 'content', 'tree', hash( 'parent_node_id', 2 ) )}
{foreach $nodes as $node}

This example demonstrates how the "debug-accumulator" mechanism can be used to generate some debug statistics based on the encapsulated template code.

Balazs Halasy (21/03/2005 10:21 am)

Julia Shymova (11/09/2007 12:43 pm)

Balazs Halasy, Svitlana Shatokhina, Julia Shymova


There are no comments.