Was this page helpful?

Content model best practices for Compose

This document describes Compose that is driven by a legacy content model. If you set up Compose after April 21st 2022, please refer to the updated Compose documentation.

Linking pages

Use references or Rich text links to "Compose: Page" entries to add links to other pages. This will make it easier to resolve and render the links in the frontend application as the linked entry will contain all the information that is required to generate a URL (title, slug, page type).

Compose page links

Compose link pages rich text

We also recommend disabling the option "Show: "Create new entries"" on a reference field that can link to other pages. Otherwise, the new page will be created without a page type and SEO entry. Those missing entries need to be created by the editor in the detail editing view of the new page.

Compose page reference appearance

Avoid linking to page type entries

A page type entry should have a 1:1 relationship with the containing "Compose: Page" entry. If you link to page type entries more than once this might result in an unreliable preview behaviour (see Configuring website previews section).

Create a dedicated content type for each page type that represents a topic

Often you need to create a page type that represents a detail page for a topic. It would be tempting to just use the existing topic content type as a page type, but we don’t recommend this approach for a couple of reasons:

  • A page type entry should have a 1:1 relationship with the containing page. It is considered to belong to that page.
  • As content preview is configured on the page type level it can lead to an unreliable preview behaviour. Read more about configuring content preview here.
  • Often there is the need to add specific fields to the page type which should not be part of the topic content type.

It is the recommended approach to create a "wrapper" page type for each topic content type:

Imagine you have a topic content type called "Author" which is linked by many other entries such as blog posts. Now you want to create an "Author Page" detail page which shows information about the author and lists all the content that has been published by the author.

First you create a new page type called "Author Page". Then you add a single-reference field to link to the author entry. Additionally you can add any other fields for content that you want to display on the page (e.g. a reference field for featured content).

Compose topic page type

Compose topic page example