> 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/conditional-content.md).

# Conditional Content

Every component has a "When it shows" section.

## 19. Show content only under a condition

Every component has a "When it shows" section. Leave it alone and the component always shows; fill it in and it appears only under the rule you set. This chapter walks both kinds — a time window, which the CMS decides before the page is sent, and a condition your storefront answers as the page is drawn — the preview controls that let you keep working on content no visitor can currently see, and how to schedule a whole page the same way.

### 19.1 Every component has a "When it shows" section

The section sits above the component's own fields and applies to the component as a whole, not to one of its values. It stays folded away until you use it, so a page of unconditional blocks looks exactly as it always did. Everything you add inside has to be true at the same time.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-0283170ae1da39c973bab4185c0f51209df480a5%2Fcms_ug_p47_1.png?alt=media" alt="19.1 Every component has a &#x22;When it shows&#x22; section"><figcaption><p>19.1 Every component has a "When it shows" section</p></figcaption></figure>

### 19.2 Give it a time window

"Show from" and "Show until" can be used together or on their own — a start alone means "from then on", an end alone means "until then". Times are read in your own timezone, so 09:00 means 09:00 where you are sitting. A time window is resolved by the CMS before the page is sent, which means that outside it the content is not in the page at all: nobody can read next week's campaign out of today's page source. The "Conditional" badge on the section header is how you spot a component that carries a rule without opening it.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-5f9662dae88f50d4b307f4c7892d8d619d29f0e2%2Fcms_ug_p48_1.png?alt=media" alt="19.2 Give it a time window"><figcaption><p>19.2 Give it a time window</p></figcaption></figure>

### 19.3 Add a condition your storefront answers

This list comes from your storefront, not from the CMS — your development team declares which conditions it can answer, and each one arrives with its own settings. Those cover whatever the CMS cannot know by itself: whether the visitor is signed in, which region they are in, what time it is where your goods ship from. The CMS never learns what any of them mean; it stores the rule and asks your storefront at the moment the page is drawn. Add a second one and both must hold. On a commerce storefront the shopping ones appear here too, and because the settings of a condition are ordinary fields they can use the same pickers as the rest of the editor — "only when this product is in the basket" opens the product picker you already know.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-56698b292ac2038ee775fb3f7de9400199e5f01c%2Fcms_ug_p49_1.png?alt=media" alt="19.3 Add a condition your storefront answers"><figcaption><p>19.3 Add a condition your storefront answers</p></figcaption></figure>

### 19.4 Save, and the rule travels with the component

The condition is stored on the component itself, so it survives publishing, copying the page to another language, and being moved into a container. A container passes its own condition down to everything inside it, which is how "this whole band, only during the sale" becomes one setting rather than one per block.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-fee5c4150bde77fb0f8300377cf6f24b316d67a0%2Fcms_ug_p50_1.png?alt=media" alt="19.4 Save, and the rule travels with the component"><figcaption><p>19.4 Save, and the rule travels with the component</p></figcaption></figure>

### 19.5 Look at the page as a visitor would

This control appears once a page carries any condition. "Show everything" is how you keep editing a block no visitor can currently see — without it, setting a condition would make the thing you are configuring vanish from under you. "What a visitor sees" hides anything whose conditions are not met right now. Below them you can move the clock to launch day, or force any single condition on or off and see exactly what that visitor gets. None of it changes what is stored.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-6ef96c5d5699f62d9b54faa9f44dfa94c1afb981%2Fcms_ug_p51_1.png?alt=media" alt="19.5 Look at the page as a visitor would"><figcaption><p>19.5 Look at the page as a visitor would</p></figcaption></figure>

### 19.6 A whole page can be scheduled too

The same idea one level up: Actions, then Page metadata, then the Routing tab, where "Available from / until" schedules the page itself. It sits under Routing because it decides whether the address resolves at all — outside its window a visitor gets "not found" rather than an empty page, which is also the right answer to give a search engine. Your draft stays reachable the whole time, so you can build and review a campaign page long before it opens. Leave both fields empty and the page is simply always available. Note that a page takes a time window only: "is this address live" is a question the CMS has to answer before your storefront is involved at all.

<figure><img src="https://270962768-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaAxCFK0JJRlhIPufuXz8%2Fuploads%2Fgit-blob-5067da2330a8b30d3ffb8ab6f7d36f72188bbec3%2Fcms_ug_p52_1.png?alt=media" alt="19.6 A whole page can be scheduled too"><figcaption><p>19.6 A whole page can be scheduled too</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/conditional-content.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.
