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

Content, content types and locations

The content model of the DXP for developers - content types and fields, content items, versions, translations, locations in the tree, sections, object states, users, roles and policies - with the repository services…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/dxp-developers/content-types-and-locations.md

On this page

Content, content types and locations

This page is for developers who model content on the DXP. It names the parts of the content model, the repository service that handles each part in PHP, and the Exponential 6 term for readers who know that kernel. The services listed are the interfaces in Ibexa\Contracts\Core\Repository of the installed core (se7enxweb/exponential-platform-dxp-core).

Contents

  1. The parts of the model
  2. Versions and translations
  3. The tree
  4. Access
  5. Working with the repository in PHP
  6. Modeling advice

The parts of the model

PartWhat it isServiceIn Exponential 6
Content typeA definition with fields, grouped in content type groupsContentTypeServicecontent class
Field definitionOne field of a content type, with a field type and settingsContentTypeServiceclass attribute
Content itemOne piece of content of a content typeContentServicecontent object
FieldA value of a field definition on a content itemContentServiceobject attribute
LocationA place of a content item in the treeLocationServicenode
SectionA label for access and design rulesSectionServicesection
Object stateA state in a state group (for example locked, unlocked)ObjectStateServiceobject state
URL aliasA readable URL for a locationURLAliasServiceURL alias

The field types available are on The field types it ships.

Versions and translations

Every change of a content item creates a version. A version is a draft until it is published; the previously published version is archived. exponential:content:cleanup-versions prunes old drafts and archived versions (Console commands).

Each version holds one or more translations. The languages of the repository are managed with LanguageService; which languages a siteaccess shows is its languages setting (Siteaccesses). The admin configuration in an installed project notes that content and content types start in eng-GB.

The tree

Content items are placed in a tree of locations. A content item can have several locations; one is its main location. Moving, copying, hiding and trashing work on locations (LocationService, TrashService). exponential:copy-subtree <source> <target> copies a subtree from the command line.

Access

Users and user groups are content items (UserService). Roles are sets of policies (module and function, with limitations), assigned to users or groups, optionally limited to a subtree or a section (RoleService, PermissionResolver). Console commands take a --user option and act with that user's permissions.

Working with the repository in PHP

Inject the services into your own service in src/, never fetch them from the container by hand:

<?php

namespace App\Service;

use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\LocationService;

final class ArticleReader
{
    public function __construct(
        private readonly ContentService $contentService,
        private readonly LocationService $locationService,
    ) {
    }

    public function titleOfLocation(int $locationId): string
    {
        $location = $this->locationService->loadLocation($locationId);
        $content = $this->contentService->loadContent($location->getContentId());

        return (string) $content->getFieldValue('title');
    }
}

The interfaces are upstream API: their full documentation is the upstream line's public API reference, which the DXP keeps compatible because the forks keep the namespaces (The se7enxweb forks).

Modeling advice

  • Model by meaning, not by page: an "Event" type with a date field, not a "Right column box".
  • Prefer relations to copying: a relation field to an author content item instead of a text field with a name.
  • Keep identifiers stable; templates, GraphQL types and API clients use them. The GraphQL schema is generated from your content types, so regenerate it after every change (GraphQL).
  • After a content type change, reindex if search uses the changed fields (Reindexing).

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