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

The datatypes tour

The datatypes of the Learning book, one by one, with what each stores, what to watch for, and what changed: dates, the deprecated enum, images, the keyword and matrix types, relations.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/book-learning/the-datatypes-tour.md

On this page

The datatypes tour

The book walks through the datatypes one at a time, saying for each what it stores and whether it can be searched or used to collect information from visitors (creating and editing objects). The same datatypes exist, and more. This page keeps the book's descriptions and adds today's notes. Which of them to choose for which job is the subject of Choosing datatypes; the code-side view is Datatypes. The list on your own site is the one the class editor shows, because content.ini [DataTypeSettings] AvailableDataTypes[] decides it.

Text and numbers

DatatypeWhat it storesNotes
ezstringone line of text, with a maximum length and a default
eztextseveral lines of plain text
ezxmltextstructured text (rich text tags)The online editor writes it for the editor.
ezinteger, ezfloatwhole and decimal numbers, with minimum, maximum and default checked on inputIntegers can be searched; the book said floats cannot.
ezemailone e-mail addressOnly the format is checked, never that the address or domain exists.
ezisbnan ISBN, checked for form
ezidentifiera generated serial string such as doc-007-en: prefix, suffix and number of digitsGood for serial numbers of articles, photographs or products.
ezbooleana check boxOften used to switch a template part on or off, such as a comment button.
ezauthorone or more authors (name and e-mail)Not related to the users of the site.

Dates and times

ezdate, ezdatetime and eztime check their input. The book warned that dates are stored as UNIX timestamps and therefore limited to the years 1901 to 2038 on Linux and 1970 to 2038 on Windows. That limit came from 32-bit timestamps; on a 64-bit PHP, which every supported Exponential installation uses, it does not apply. The other warning stands: validation is not foolproof (for example the day of the month is not checked against the month), so test odd dates before relying on them in a filter or sort.

Files and media

DatatypeWhat it storesNotes
ezbinaryfileany file, with an upload limit in MB (0 for none)Search indexing of non-text files uses the programs set in settings/binaryfile.ini.
ezimagea picture; the sizes you define (aliases, like medium, small, large) are made on uploadAliases are in settings/image.ini. Alternative text is required where the class asks for it (content model).
ezmediaa media clip, with a size limitThe book's Flash, RealPlayer and Quicktime formats are history; use files and a player in the template.

Choices

DatatypeWhat it storesNotes
ezselectionone or more values from a list the class definesThe book's replacement for ezenum.
ezenuma list of values, single or multipleDeprecated since 3.3 for its complexity and cost. It is still installed for old classes; do not use it for new ones.
ezoption, ezmultioption, ezmultioption2, ezrangeoptionoptions with prices for a shopSee e-commerce.
ezkeywordcomma-separated keywordsObjects with a common keyword can be listed together ("see also"); see common template tasks.
ezcountrya country (or several)

Structure

DatatypeWhat it storesNotes
ezmatrixa table: a set number of columns, rows the author can addThe book calls it among the most versatile types, for a varying number of items in one object.
ezobjectrelationone related objectCannot restrict the class of the object chosen.
ezobjectrelationlistmany related objects, optionally creating them, with a start node for browsingcontent.ini [ObjectRelationDataTypeSettings] ClassAttributeStartNode[] sets the start node. Useful to build compound objects and categories.
ezinisettingan INI setting, chosen by siteaccess, file, section and parameter, changed from an objectUse with caution: anyone who may edit the object changes the setting.
ezuserthe account (login, e-mail, password) of a user object
ezurla link with its textStored in a table of links so link checks can find it.

Extensions add more datatypes; examples are tags (eztags), a map location (ezgmaplocation) and star ratings (ezstarrating). See Datatypes to learn how one is built.

Next: rich text tags.

Source and license

Adapted from chapter 2, "Content Management with eZ publish", of Learning eZ publish: Building Content Management Solutions by Paul Borgermans, Tony Wood, Paul Forsyth, Martin Bauer, Björn Dieding and Ben Pirt (additional material by Bruce Morrison), second edition, 2024, Book-Learning-eZPublish. Copyright (c) 2004-2024 7x and Graham Brookins. Licensed under the GNU Free Documentation License, version 1.3 or any later version, with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts (the license). Changes: rearranged and shortened; settings, labels, datatypes, tags and URLs checked against Exponential 6 and corrected; links to the current guides added.

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