One of the basic properties of the system is the separation of content, the application logic that handles it and its presentation for a browser or for other output (a PDF, a feed, an API). The same object can be shown as a full page, a line in a list, a teaser, a feed entry, or JSON, each by a template for that purpose.
Two areas of a page
A page has two main parts:
- The page layout (
pagelayout.tpl): the frame around everything. Menus, header, footer, scripts and styles live here. In the book's figure these are the parts marked P. - The content view: the part for the thing asked for (an article, a folder listing, a form, an administration
screen). Content views come from the kernel modules for the address you asked for. These are the parts marked C.
The content view is put inside the page layout as
$module_result.content.
Examples of content views: an article, a folder with its children, a search form, role editing, the output of an extension's module.
Structure is not layout, but they can agree
The tree is independent of the page layout. Yet a well-planned tree can also drive the layout: the top-level nodes can be the main menu, and their children (mostly folders) the entries of a sub-menu. Templates can read the same objects the same way everywhere. See menus.
Where to learn the templates
Next: roles and policies, step by step.
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.