Documentation Center

Options for consuming content from Contentful

Tridion Connector for Contentful enables you to consume content from the Contentful repository as a single HTML fragment or as separated element, that is as "normalized" content.

With this connector, you can consume content from the Contentful repository in either (or both) of the following ways:
  • As a HTML fragment, that is, the whole content piece rendered as one unit. Is useful for simple scenarios where it could be handy to reuse the prerendered HTML content as-is
  • As a list of normalized content fields, where different parts of a content item, such as article, are broken down into a set of reusable content fields, such as images, text blocks and other field types. These content fields are similar to Schema fields in Tridion Sites. After normalization, it is possible to choose specific parts of the content to use in Tridion Sites. With the template-based publishing in Tridion Sites, you can use and use various templates to control how the content gets rendered.

To support these two ways to use the content, the Connector for Contentful outputs the Contentful content in a multipart format (.MHT files), which includes both the HTML fragment and normalized content. The following sample code illustrates a single MHT file with the two distinct parts:

The following diagram illustrates the two ways that Tridion Sites can consume the MTF file and two types of content for use on a Tridion Sites website:

The website on the top consumes the HTML fragment, as-is, while the one on the bottom consumes the content as individual content fields.