Experience Manager: Component creation using Content Type

Experience Manager: Component creation using Content Type

It is time to finalize the series of posts related to Experience Manager content creation activities and cover Component creation using Content Types.

In case you missed two previous posts you can take a look at them:

To simplify the storytelling let’s start with basic definitions.

Definitions

Content Types are used to simplify the creation of new Components in Experience Manager. A content type is defined using the following parameters:

  • Base Component – a new Component will be created as a copy of the base Component
  • Target Location – the folder where a new Component will be created
  • Component Template – Component Template used for creating a Component Presentation

Content Types can be predefined (Predefined Content Types) and generated (Dynamic Content Types).

Let’s cover each of them separately.

Predefined Content Types

  1. There can only be one Content Type based on the same Component - two Content Types cannot share the same Component.
  2. Content Types are explicitly defined on Publications.
  3. Content Types defined on a parent Publication will be available in the Publication itself and in all its child Publications.

Content Type View

Dynamic Content Types

Dynamic Content Types are dynamically generated by Experience Manager using Components found on the current Page. A Content Type is created based on Component, its Folder, and the Component Template.

Page Template configures which predefined Content Types should be available to Experience Manager users and whether dynamic Content Types should be available to them.

Content Types settings

The process of generating the list of Content Types that a user can select in Experience Manager involves the following steps:

  1. Collecting all Content Types
  2. Resolving the context Publication (from what publication Content Type is coming from)
  3. Filtering out inaccessible Content Types

Let’s go and explain each of the steps.

Collecting Content Types

  1. Content Type configuration is retrieved from the Page Template in the current
  2. The list of Predefined Content Types will only include content types defined in Publications that belong to the BluePrint chain for the resolved BluePrint context of the current Page.

For example, if the Page's Page Template in the current Publication G configures Content Types defined in Publications G, E, B, and C, while the Page's resolved BluePrint context is F, these Content Types will not be in the list of collected Content Types. That is unless the same Content Types (Content Types based on the same Components) are defined in Publications F, D, or A too.

3. If the same schema is used in a Dynamic Content Type and in at least one resolved predefined Content Type, the Dynamic Content Type will be 'hidden' – excluded from the list of collected Content Types.

Resolving the context Publication

For every collected Content Type the context Publication is determined as follows:

A component is read in the resolved BluePrint context of the current Page to determine its Owning Publication. Then:

  1. If the Owner Publication has a lower priority (higher in the BluePrint chain) than the Configured Component BluePrint Context then:
  2. If the Configured Component BluePrint Context has a lower priority (higher in the BluePrint chain) than the resolved BluePrint context of the current Page, then the Content Type gets the context of the Configured Component BluePrint Context
  3. Otherwise, the Content Type gets the context of resolved BluePrint context of the current Page
  4. Otherwise (if the Owner Publication has a higher than or equal priority as the Configured Component BluePrint Context) the Content Type gets the context of the Owner Publication

Every Content Type gets a URI equal to the URI of its base Component the corresponding context Publication.

Filtering out inaccessible Content Types

The list of Content Types will only include Content Types where:

  • The user has read access to the Component
  • The user has write access to the target Folder

Creating New Components

Creating a new Component is done by copying the base Component to the target Folder in the context Publication of the Content Type. The new Component Presentation is created and added to the Page by combining the new Component and the Content Type's Component Template in the resolved BluePrint context of the Page.

Hope this article was helpful and explains Component creation in Experience Manager. Feel free to ask additional questions in the comments.