Page Types

Adding Default Content

Based on its layout template, a page can have one or more content placeholders, part of the page to add content to. Each placeholder is identified by its ID in the layout template and is selectable by its user-friendly name when creating or editing a page.

Figure 23: Two content placeholders available

A placeholder can contain default content that will be inserted when you create a page.

You can normally add content on each page in a content placeholder manually, or you can have default content added automatically when creating a page by selecting a page type that includes the content. For this, you need to add a placeholder content item to this page type.

Like with metadata fields, you add the placeholder in the Layout perspective under Page Types.

To add a placeholder content item to a page type:

  1. Make sure that the content placeholder with the proper ID is available in the layout template used in the page type by default.
  2. Expand a page type and select Placeholder Content.
  3. Click Add Default Content on the toolbar. The Add Default Content dialog appears.
  4. In the Placeholder ID field, write the ID of the existing content placeholder from the layout template.

    Figure 24: Adding a placeholder content item

  5. Click Finish. The Visual Content editor opens in the right pane.
  6. On the Content tab, add content you want added by default when creating a page.
  7. Once done, click Save.

Figure 25: Default content (a CMS function) added

The default content item appears under Placeholder Content of the page type.

Figure 26: A placeholder content item added to the page type

Important Notes

You can only use existing placeholders identified by their IDs. You can check for them in a layout template used in the page type. Each type of layout templates – XML, Razor, or Master Page-based - defines the ID in a different way.

For more information on placeholders and their IDs, please see:

Default content is only added when you create a page. If you switch to the page type with default content on an existing page, no default content is added.

If the layout template used with the page type by default does not contain the placeholder with the ID you have specified, no default content is added. (The ID is case-sensitive and, for example, “Default” and “default” are two different IDs.)