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

Operators overview

What template operators are, the two call styles, where operators come from (the template library, the kernel, PHP functions in template.ini, extensions), the families designers use most, and how to find out whether an…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/operators-overview.md

On this page

Operators overview

This page is for designers who want the big picture of template operators: the functions that compute values in templates. The Operator reference lists every one.

Contents

  1. Two call styles
  2. Where operators come from
  3. The families
  4. Does this operator exist here?

Two call styles

{$title|upcase}                 {* pipe: input on the left *}
{upcase( $title )}              {* call *}
{$text|shorten( 100, '...' )}   {* pipe with parameters *}
{$items|count|gt( 0 )}          {* chained *}

Some operators take no input and are only called: fetch( ... ), array( ... ), hash( ... ), true(), currentdate(), ezini( ... ).

Where operators come from

SourceRegistered inExamples
The template librarylib/eztemplate/classes/eztemplateautoload.phparray, hash, count, eq, cond, wash, shorten, l10n, fetch, sprintf
The kernelkernel/common/eztemplateautoload.phpezurl, ezroot, ezdesign, ezimage, ezini, ezhttp, i18n, csp_nonce, module_params, topmenu
PHP functions by settingtemplate.ini [PHP] PHPOperatorList[]urlencode, urldecode, rawurlencode, rawurldecode
Extensionsextension/<ext>/autoloads/eztemplateautoload.php, when the extension is active and listed in site.ini [TemplateSettings] ExtensionAutoloadPath[]ezjscore's ezcss_load, json_encode; ezwebin's ezpagedata; layouts' expl_*

The families

FamilyPage
strings: upcase, shorten, trim, wash, concat, PHP string functionsString operators, PHP string functions as operators
arrays and hashes: array, hash, append, merge, contains, implode, explode, extractArray operators
logic: eq, ne, gt, and, or, not, is_setLogic and comparison operators
math: sum, sub, mul, div, mod, round, countMath operators
choice: cond, first_set, choosecond and first_set
escaping: washWash and escaping
URLs and design files: ezurl, ezroot, ezdesign, ezimageURL operators
translation and locale: i18n, l10n, datetime, currentdateThe i18n operator, Dates, numbers and l10n
settings and request: ezini, ezhttp, ezpreferenceThe ezini operator, The ezhttp operator
data: fetchFetch basics
assets: ezcss_load, ezscript_load, json_encodeezjscore template operators

Does this operator exist here?

An operator from an extension exists only on siteaccesses where the extension is active. An unknown operator is reported in the debug output as "Operator '<name>' is not registered", and the template prints nothing for it. The generated example pages of the help list operators with examples where available. When you depend on an extension's operator, say so in your theme's README.

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