ez projects / show_variables

Attention please: Due to restructuring legacy services, the eZ Projects service is going to be discontinued. All the current repositories will be migrated to a new platform. More details will be announced soon.

Show variables

UNIX name Owner Status Version Compatible with
show_variables Claudia Kosny beta 0.5 3.8.3, 3.9.0
Template operator that shows all variables available in the template grouped by their namespaces. Please note that this is EXPERIMENTAL.


Shows the variables that are available in the template together with their namespaces . The output is roughly similar to the one created by the attribute operator. Please note that this is EXPERIMENTAL. It works fine for me (therefore the beta status) but I haven't tested it much beyond my needs.


show_variables([info_text[, level [, print_debug [, as_html ] ] ] ] )

  • info_text (string) text to be displayed at the variable listing. Will be the legend of the fieldset if as_html is set to true, otherwise just a separate text line. Suggestion: use the name of the current template.
  • level (integer) number of levels that the variables should be expanded. Default is 1
  • print_debug (boolean) whether to output the result where the operator was called or in the debug area. If set to true, the output will be text as html tags are displayed in the debug area. Default is false.
  • as_html (boolean) whether to display a the output in an html table or as text. Default is true.

Known problems

I am not fully clear on the differences between the root namespace and the global namespace. I also never introduce namespaces in my templates, so I haven't tested this operator with different namespaces much. If there are any problems, please contact me with the details (template structure, expected output, received output...)

Tested eZpublish versions

3.8.3, 3.9.0


ckosny [at] gmx [dot] net


Output of show_variables('startpage') in one of my templates
Output of show_variables('startpage') in one of my templates

No news yet.

Average rating 5.00 by 2 reviewers.

No forum messages yet.