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

Function reference

Every template function (the brace tags that control templates) of the template library and the kernel, with its syntax in one line and the page that explains it: def, set, if, foreach, for, while, do, switch, include…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/designers/templates/function-reference.md

On this page

Function reference

Template functions are the brace tags that control a template, as opposed to operators that compute values. This page lists them by where they are registered.

Contents

  1. The template library
  2. The kernel: gui functions
  3. Extensions

The template library

Registered in lib/eztemplate/classes/eztemplateautoload.php:

FunctionSyntaxPage
def, undef{def $a=1 $b=2}, {undef $a}Variables and def
set, let, default{set $a=2}, {default name=value}Variables and def
if (elseif, else){if cond}...{elseif cond}...{else}...{/if}If and conditions
foreach{foreach $list as $key => $item offset 1 max 3 reverse}...{/foreach}Foreach loops
for{for 1 to 5 as $i}...{/for}For loops
while{while cond}...{/while}While and do loops
do{do}...{/do while cond}While and do loops
delimiter, break, continue, skipinside loopsForeach loops
switch (case){switch match=$x}{case match=1}...{/case}{case}...{/case}{/switch}Switch and case
section (section-else, section-include, section-exclude){section loop=$list}...{/section}Section (legacy)
include{include uri='design:path.tpl' name=value}Include
cache-block{cache-block keys=... expiry=...}...{/cache-block}Cache-block
set-block, append-block{set-block variable=$x}...{/set-block}Set-block and append-block
run-once{run-once}...{/run-once}Run-once
ldelim, rdelim{ldelim} prints {Literal and delimiters
literal{literal}...{/literal}Literal and delimiters
sequence{sequence name=seq loop=array( ... )}older alternating values; prefer foreach ... sequence
debug-timing-point, debug-accumulator, debug-log, debug-trace{debug-log msg='...'}Template debugging
tool_bar{tool_bar name=... view=...}toolbars of toolbar.ini
menu{menu name=...}menus of menu.ini

The kernel: gui functions

Registered in kernel/common/eztemplateautoload.php (eZObjectForwardInit); each forwards to a template chosen by the object it receives:

FunctionDrawsTemplate folder
attribute_view_guia field for viewingcontent/datatype/view/ (collect/ for information collectors) (attribute_view_gui)
attribute_edit_guia field's edit formcontent/datatype/edit/
attribute_result_gui, attribute_pdf_gui, attribute_diff_guicollected results, PDF, version differencescontent/datatype/result/, pdf/, diff/
node_view_guia node in a view modenode/view/<view>.tpl (node_view_gui)
content_view_guian object in a view modecontent/view/<view>.tpl (content_view_gui)
related_view_gui, content_pdf_gui, content_version_view_guirelated objects, PDF, versions
class_attribute_view_gui, class_attribute_edit_guiclass definitions (administration)
event_view_gui, event_edit_guiworkflow events (administration)
collaboration_*, shop_account_view_guicollaboration and shop account parts

Extensions

  • explblock (explayouts) draws a layouts block.
  • powercontent_create_gui, powercontent_attribute_create_gui (nxc_powercontent, where active).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

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