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 content model for engineers

The Exponential content model as a data model - classes and attributes defined at run time, objects with versions and translations, nodes in a tree, datatypes that own storage and validation, sections, object states and…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/software-engineers/content-model-for-engineers.md

On this page

The content model for engineers

This page is for engineers who need to understand the content model as a data model before they design on top of it: what the entities are, which kernel class represents each, and what follows for queries, migrations and APIs. The editor's view of the same model is in The content model and editing content.

Contents

  1. The entities
  2. Runtime-defined schema
  3. Versions and translations
  4. The tree
  5. Datatypes
  6. Consequences for engineers

The entities

EntityMeaningKernel class
Content classa type of content: name, identifier, attributeseZContentClass
Class attributeone field of a class, with a datatype and its settingseZContentClassAttribute
Content objectone piece of content, an instance of a classeZContentObject
Versiona state of an object: draft, published, archivedeZContentObjectVersion
Object attributethe value of one class attribute in one version and one languageeZContentObjectAttribute
Node (location)a place of an object in the content tree; one object can have severaleZContentObjectTreeNode
Datatypestorage, validation, editing and indexing of one kind of attributesubclasses of eZDataType
Sectiona partition of content used by permissions and designseZSection
Object statea value from a state group, usable in permissionseZContentObjectState

Runtime-defined schema

Content classes are data, not code. Administrators add classes and attributes in the administration without a deployment, and the tables do not change: attribute values live in generic columns of ezcontentobject_attribute, interpreted by the datatype. Classes can also be shipped in packages (Packages).

That flexibility has a price: a query on a field value is a join through the attribute table, filtered by class attribute; use the fetch functions and their attribute filters rather than hand-written SQL.

Versions and translations

  • Every edit creates a new version; publishing makes it the current version. Unpublished edits stay as drafts.
  • The number of archived versions kept is limited per class by content.ini [VersionManagement] (DefaultVersionHistoryLimit, VersionHistoryClass[]); exp:cleanupversions removes old versions (read its --help first: without it, it deletes).
  • Each object attribute exists per language. Which languages a siteaccess shows, and the fallback, are settings (Content languages, Content object fallback locale).

The tree

Nodes form one tree; every node has a parent, a path string and a depth. Node 2 is the root of the content tree in a default installation. Permissions with subtree limitations, URL aliases and most lists follow the tree, so its shape is part of your design. Moving or hiding a node changes the URLs and the visibility of everything below it.

Datatypes

A datatype is the extension point of the content model: one PHP class that stores, validates, edits, renders and indexes one kind of attribute. Datatypes register in settings/content.ini [DataTypeSettings] AvailableDataTypes[]; an extension adds its own through ExtensionDirectories[]. A datatype must validate input in validateObjectAttributeHTTPInput() and must not change the stored format of existing attributes without an update script (Custom datatypes, Datatype lifecycle).

Consequences for engineers

ConcernConsequence
Readsuse fetch functions (templates) or the content API (PHP); they apply permissions (The content API)
Writescreate and publish through the kernel so versions, caches, search and the audit trail stay consistent (Creating content in code)
Migrations of content structureclass changes are data changes; plan them with packages or scripts, not SQL
APIsthe REST API exposes objects, nodes and attributes with the same permission checks (API design)
Large operationsremoves, copies and moves of big subtrees run as content jobs in the background (Content jobs)
Cachesa publish clears the view caches of the affected nodes through eZContentCacheManager (Cache invalidation and clearing)

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