Content types

  • Updated
This topic is for CMS administrators and developers with administration access rights.

Content in Optimizely can be page types and block types, folders, or media files such as images and documents. Content can also be products in a product catalog in Optimizely Commerce Connect.

Content types and properties

Page types and block types contain the properties where editors enter information, such as a link to an image on a web page.

Content-types-1.png

For a content type, you define properties that can hold information, such as a link to an image, a web page, or editorial text. A typical website has a set of content types that match the identified functions needed on that website.

The content type is the foundation for creating one or many page or block instances. The page type or block type and its properties must be mapped to the corresponding rendering to display content to visitors.

The content concept in Optimizely Content Management System (CMS) is based on inheritance from a "generic" content type, which is then used to create specific content types, such as a page type or a media folder. Using this feature, developers can create custom content types when they set up new websites.

  • You can define page or block types in code or from the admin view. 
  • For page types defined in code and for all block types, you can define "non-breaking changes" of properties in the admin view.
  • You are notified if you cannot change the settings defined in code in the admin view.
  • If you change a page type defined in code, you can reset the changes to the original values defined in code.

Page types

Changing page type settings may cause the website to stop working. Although you can create page types in the admin view, you should create them from code.

Editing a page type

To edit settings for an existing page type:

  1. Go to Settings > Content Types.
  2. Select the page type from the list.
  3. Click Settings.
    Select the page type from the list.
  4. Modify the form.
  5. Click Save.

Because you can identify page types and their properties in code or from the Settings view, you can change some settings from the Settings view. If a page type is created from code, this is shown on the page type information page under General.

You cannot delete certain page types defined in code. These are typically page types upon which other page types are based, such as the standard or default page and the start page.

Using the Access level area, you can define which users or user groups will have access to the page type.

Video: Make a page type available for only some users

video icon Video tutorial: Make a page type available for some users but not for others (3:06 minutes)

Create a page type from the Settings view

  1. Go to Settings > Content Types, and select  Create New >  Page Type.

    Create a page type from the Settings view

  2. Set values in the new page Settings tab.

    Set values on the page

    • Name – A name for the page type.
    • Display name – The name to be displayed in the list of available page types.
    • Description – The text describing the page type also displays in the list of available page types.
    • Sort index – A number determining the (ascending) sort order in the list of available page types. The default is 100.
    • Available in edit view – Select to make the page type available for selection when creating pages in the editorial interface. You should hide rarely used page types, such as the start page type. You can make these available when needed and then hide them again.
  3. Set the values on the Permissions tab.

    You can use the Search box to filter and find users and groups to which you want to give access.

    Set the values on the Permissions tab.

  4. Set values on the Default Values tab.

    You can set default values for some of the built-in properties in Optimizely CMS from the admin view. You can also specify default values for the properties from code which are not visible in the admin view.

    Set values on the Default Values tab.

  5. Set values on the Child Content Types tab.

    When creating pages, limit the available page types in the page type list to make it easier for editors to choose the correct page type. For example, for an Alloy Tech parent page, you can specify that the only available page type is News Page.

    Set values on the Child Content Types tab.

  6. Click Save.

Copy an existing page type

When you copy a page type, its properties are copied also. You can then edit the information for the page type and its properties. Copy a page type as follows:

  1. Select Copy Page Type in the Manage Page Types tab in the Settings view.
  2. Select the page type you want to copy from the drop-down list and click Copy. A window will display the same properties.
  3. Edit the page type information to suit your requirements and click Save.
Copied page types are untyped, and you need to add the path to the display template; otherwise, pages based on the page type will not have a preview.

Block types

Block types are similar to page types, and you can modify some settings from the Settings view.

Edit the settings for an existing block type as follows:

  1. Go to Settings > Content Types, and select a block type (such as Contact).
  2. Click Settings.
    Edit the settings for an existing block type
  3. Change one or several settings as described for Create a page type from the Settings view.
  4. Click Save.

Media types

Media types are similar to page types. You can add properties, modify permissions, and some settings from the Settings view.

Edit a media type

Edit the settings for an existing media type as follows:

  1. Go to Settings > Content Types, and select a media type (ImageVideo, or Media).
  2. Click Settings.
  3. Enter the following information.
    • Name – A name for the media type.
    • Display name – The name to be displayed in the list of available media types.
    • Description – The text describing the media type also displays in the list of available media types.
    • Sort index – A number determining the (ascending) sort order in the list of available media types. The default is 100.
    • Supported media extensions – Comma-separated list of file extensions the media type supports. 

    media types settings

  4. Click Save.

Create a media type from the Settings view

  1. Go to Settings > Content Types, and select Create New > Media Type.

    Create a media type from the Settings view

  2. Enter the following information.
    • Name – A name for the media type.
    • Display name – The name to be displayed in the list of available media types.
    • Description – The text describing the media type also displays in the list of available media types.
    • Sort index – A number determining the (ascending) sort order in the list of available media types. The default is 100.
    • Type –  Required for image and video types. Select the media type.

      Select the media type.

    • Supported media extensions – Comma-separated list of file extensions the media type supports.
  3. Click Save.

Other content types

By default, there are generic content types for other types of content, such as folders and media files. Based on these, developers can create specific content types. You can have a specific folder or media file content type where you can add properties such as Copyright or Photographer.