Documentation

Mapping Web Content Templates to Fragments

By default, you can map Web Content Structure fields holding a single value (such as Date, Numeric, Image, Number, or Text) to Fragments. For multi-value fields (such as Select from List, Radio Button, or HTML) you must first render the field using a Web Content Template; then you can map the Template to a Fragment.

For example, the Web Content with Audience Structure on this image contains a Content field of Text type and an Audience field of Select from List type:

You can map single-value Structure fields to Fragments by default.

You can map the single-value Content field directly to a Fragment, but you need a Web Content Template to map the multi-value Audience field. The Web Content Template should use the same Structure as the Web Content Article containing the field you want to map. The following image shows this relationship:

Create a Web Content Template that uses the Same Structure as the Web Content Article.

Note

If you want to map several Structure field values to individual Fragments, you must create a separate Web Content Template that renders just one field for each field that uses that Structure. If you render all your fields in one Template, all their values map to the Fragment when you select the Template.

Mapping a Web Content Template to a Fragment

  1. Create a Web Content Structure that contains the multi-value field you want to map.

  2. Create a Web Content Template that uses the same Structure with the multi-value field (A).

  3. In the Web Content Template, under Fields (B), select the variable (C) with the multi-value field in the Structure.

    Create a Web Content Template based on the Structure with the multi-value field.

  4. Create the Web Content based on the previous Web Content Template.

    Create the Web Content based on the Template with the multi-value field.

  5. On the Fragment-supported page (Content Page, Display Page Template, etc.) add the Fragment.

  6. On the sidebar panel, click the Selection (Selection) button and choose the element in the Fragment you want to map.

  7. Under the Mapping section, select and map the Web Content Article that contains the value you want to map.

  8. Click the Field dropdown menu and select the Web Content Template you created before.

    Map the field in the Web Content Template to your Fragment.

  9. Click Publish to save the changes.