Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Datatype view templates

The templates that draw each kind of field (text line, rich text, image, date, relation ...) under content/datatype/view, what a few of them look like, how to restyle one for your whole design or for one class, and the…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/datatype-view-templates.md

On this page

Datatype view templates

This page is for designers who change how a kind of field looks everywhere: every date, every image, every list of related items. Each datatype has a view template in content/datatype/view/<datatype>.tpl, used by attribute_view_gui.

Contents

  1. The templates
  2. Two examples
  3. Restyling for the whole design
  4. Restyling for one class or field
  5. Rules

The templates

design/standard/templates/content/datatype/view/ has one per datatype: ezstring.tpl, eztext.tpl, ezxmltext.tpl (rich text), ezimage.tpl, ezbinaryfile.tpl, ezdate.tpl, ezdatetime.tpl, eztime.tpl, ezboolean.tpl, ezinteger.tpl, ezfloat.tpl, ezprice.tpl, ezemail.tpl, ezurl.tpl, ezkeyword.tpl, ezselection.tpl, ezcountry.tpl, ezauthor.tpl, ezmatrix.tpl, ezmedia.tpl, ezobjectrelation.tpl, ezobjectrelationlist.tpl, ezuser.tpl and more. Extensions add their own (for example eztags).

Two examples

The text line, in full:

{$attribute.data_text|wash( xhtml )}

Rich text prints the HTML its tag templates produced:

{$attribute.content.output.output_text}

The rich text's own markup comes from the tag templates in ezxmltags/ (Rich text templates).

Restyling for the whole design

Copy the template to the same path in your design and change the copy:

design/mytheme/templates/content/datatype/view/ezdatetime.tpl

Every siteaccess using your design now draws dates your way. Keep the variables the original reads ($attribute) and the parameters it accepts, since other templates pass them.

Restyling for one class or field

Use an override with Source=content/datatype/view/<datatype>.tpl and Match[class_identifier] and/or Match[attribute_identifier] (attribute_view_gui).

Rules

  • Wash what is not already HTML; do not wash rich text output.
  • Keep the markup small and semantic: these templates run many times per page.
  • Print nothing for an empty field, or let the caller test has_content.
  • The kernel's templates say "DO NOT EDIT THIS FILE! Use an override template instead." Copy, never edit.

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