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

Mapping a design to content classes

How theme designers turn mockups into a map of content classes, fields and view modes - reading a class, what each common datatype can look like, a mapping sheet to fill in, and what to ask the developer when a field is…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/theme-designers/mapping-a-design-to-content-classes.md

On this page

Mapping a design to content classes

This page is for theme designers who need to connect their mockups to the content an installation really stores. In Exponential every page shows an object of a content class, and every visible piece of text or media comes from one of the class's fields (attributes). A mapping sheet, filled in before you draw details, keeps the design and the content model in step. The content model itself is the developer's work: Designing a content model explains how it is made.

Contents

  1. Why map at all
  2. Reading a class
  3. What each kind of field can look like
  4. The mapping sheet
  5. A worked example
  6. When the design needs a field that does not exist

Why map at all

A mockup can show anything; a template can only show what a field holds. Three problems are found by mapping and are expensive to find later:

  • a visual element with no field behind it (a subtitle, a reading time, a colored label);
  • a field the design forgot (an author, a caption, a date) that editors fill in and expect to see;
  • an element drawn as structured that is stored as free rich text, or the other way round.

Reading a class

Ask for an editor or administrator account on a development installation, then open Setup > Classes in the administration and open the class. For each field note the identifier (for example title, intro, image), the datatype, and whether it is required. Required fields are always there; every optional field needs a design for "empty" (Designing for editors).

A developer can also give you the list from the command line or from the class definition in the project's package. Background: Content classes and attributes.

What each kind of field can look like

DatatypeHoldsDesign questions
ezstringone line of textLongest realistic length? Does it wrap or truncate?
eztextplain text with line breaksParagraphs or one block?
ezxmltextrich text: headings, lists, links, embeds, tablesStyle every element editors can insert (Rich text templates)
ezimageone image with alternative textWhich crops and sizes? (Designing image crops and art direction)
ezobjectrelation, ezobjectrelationlistlinks to other objectsShown as embed, card, list or link?
ezdate, ezdatetime, eztimedates and timesFormat per language (Dates, numbers and l10n)
ezbooleanyes or noUsually changes behavior, not appearance
ezselectionone or more choices from a listA label, a badge, a filter?
ezkeywordfree keywordsTags, links to tag pages?
ezurl, ezemaila link or an addressLink text when the label is empty?
ezauthorone or more authorsByline layout for one, two, many
ezbinaryfile, ezmediaa file, audio or videoDownload link with type and size, a player?
ezmatrixa small tableNarrow screens?

The kernel ships view templates for each datatype under content/datatype/view/, so every field already renders somehow; your design decides how (Datatype view templates).

The mapping sheet

Make one row per visible element of each mockup:

Mockup elementClassField identifierDatatypeRequiredView modesIf empty
Headlinearticletitleezstringyesfull, line, cardnever empty
Lead paragrapharticleintroezxmltextyesfull, cardnever empty
Hero imagearticleimageezobjectrelationnofull, cardlayout without image

Keep it next to the mockups in the project repository. Developers write templates from it, and reviewers check against it.

A worked example

On the demonstration installation the Article class has title (required), short_title, author, intro (required), body, enable_comments and image, where image is a relation to an Image object, not an image field. That has three design consequences:

  1. The card can use short_title when it is filled, and title otherwise: design a card title that works at both lengths.
  2. The image comes from another object, so its alternative text and caption belong to that Image object: design the caption from there.
  3. body is optional: an article may be intro only, so the full view needs a design that does not look broken without a body.

Check your own installation; classes differ between sites.

When the design needs a field that does not exist

Do not fake it in the template. Write a short request to the developer: the element, why it matters, the datatype you expect, whether it is required, and in which views it appears. Adding a field is a change to the content model and to editors' work, so it is decided together (Working with developers).

Things that are better not stored as fields: values computed from other fields (reading time), values that belong to the frame (the site name), and purely decorative choices. Those belong in the template or in settings.

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