> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/partner-library/partner-components/medienwerft-cms/user-guide/layouts-and-themes.md).

# Layouts and Themes

Layouts are the chrome — headers, footers, sidebars — that pages render inside.

## 23. Edit a layout

Layouts are the chrome — headers, footers, sidebars — that pages render inside. Editing a layout changes every page that uses it, which is exactly why they are edited in a different place from pages themselves. This chapter walks opening a layout, seeing which slots it exposes, and how those slots differ from the page slots.

### 23.1 Layouts open in the same editor as pages

Same split view as the page editor: preview on the left, component tree on the right. The tree shows only the layout's own slots — the header/footer chrome — which are read-only when a page is open and editable here.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-46e9c802dd4d406e61ac195343afaced009d2674%2Fcms_ug_p60_1.png?alt=media" alt="23.1 Layouts open in the same editor as pages"><figcaption><p>23.1 Layouts open in the same editor as pages</p></figcaption></figure>

### 23.2 The chrome component is in the tree, editable

The chrome slot's component is fully editable in the layout editor — properties, reordering, inline text, everything. From a PAGE editor the same component appears as a locked row you cannot touch. Two editors, one component, different access.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-b77ad3d52c7985487453474a6d35d7876780667f%2Fcms_ug_p61_1.png?alt=media" alt="23.2 The chrome component is in the tree, editable"><figcaption><p>23.2 The chrome component is in the tree, editable</p></figcaption></figure>

## 24. Brand a site in the Theme Editor

A theme is how a site gets its colours, type and spacing without anyone touching the storefront code. The storefront publishes the list of design tokens it is willing to expose, and the CMS turns that list into grouped, typed controls — a colour picker for a colour, a text field for a font stack. This chapter shows where a named alternate theme comes from, then creates the site's default theme, changes a brand colour, watches the preview repaint, and publishes it.

### 24.1 Themes is a dashboard tab — a default and any named alternates

Every site has one default theme, which is what visitors see unless the storefront asks for another. The first toolbar action reads "Create theme" until the default exists and "Edit theme" afterwards. Everything else on the tab behaves like the other perspectives — the same status filter, the same version history and the same per-element edit rights.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-5e123359e000ea80ca3ec2d1efed629ab35db859%2Fcms_ug_p62_1.png?alt=media" alt="24.1 Themes is a dashboard tab — a default and any named alternates"><figcaption><p>24.1 Themes is a dashboard tab — a default and any named alternates</p></figcaption></figure>

### 24.2 Add a named theme for a second palette

A site can hold more than one theme. "New theme" adds a named alternate — a customer's colours for their punchout, say — next to the default rather than instead of it. The name is how a storefront asks for this palette, so it is limited to lower-case letters, digits and hyphens, and it cannot be the site's own name, because that one is the default. A named theme is edited, saved and published exactly like the default, and publishing it leaves pages that use the default untouched.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-28f1ede56176ff10fde6e36e088dd61ad9e0987a%2Fcms_ug_p63_1.png?alt=media" alt="24.2 Add a named theme for a second palette"><figcaption><p>24.2 Add a named theme for a second palette</p></figcaption></figure>

### 24.3 The token editor — grouped, typed controls

The storefront declares which tokens a theme may override, how they group, and what each one means — so the CMS can show an author a named brand colour with a colour picker instead of a raw CSS variable. Groups that carry rarely-touched tokens keep them behind a "Show advanced" toggle. A token you have not overridden shows the value the site actually resolves today, measured in the live preview rather than guessed, and once you override it a Reset link appears to put it back.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-375e3970ff5bdc56faa483e09e99064a02dd0511%2Fcms_ug_p64_1.png?alt=media" alt="24.3 The token editor — grouped, typed controls"><figcaption><p>24.3 The token editor — grouped, typed controls</p></figcaption></figure>

### 24.4 Change a colour and the preview repaints

Edits reach the preview as you type — the editor pushes just the changed variables into the frame rather than reloading it, so the page you are looking at restyles in place. Nothing is saved yet: this is a working buffer, and Discard puts it back to the last saved state. Values are validated as you go, and anything that could smuggle CSS into the site is rejected before it can be saved.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-b874eb99cd502daa0d14b07c9bab100997121d27%2Fcms_ug_p65_1.png?alt=media" alt="24.4 Change a colour and the preview repaints"><figcaption><p>24.4 Change a colour and the preview repaints</p></figcaption></figure>

### 24.5 Save, then publish the theme

A theme follows the same two-step rhythm as a page: Save keeps the change to yourself, Publish puts it in front of visitors. It carries the same approval gate and the same version history, so a rebrand can be reviewed before it goes out and rolled back after it does. Because a theme restyles every page at once, published changes reach shoppers as their caches refresh rather than instantly.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-45cb857a4dac261e76091324af9235bbfcf6a00c%2Fcms_ug_p65_2.png?alt=media" alt="24.5 Save, then publish the theme"><figcaption><p>24.5 Save, then publish the theme</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/partner-library/partner-components/medienwerft-cms/user-guide/layouts-and-themes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
