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 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:
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¶
Create a Web Content Structure that contains the multi-value field you want to map.
Create a Web Content Template that uses the same Structure with the multi-value field (A).
In the Web Content Template, under Fields (B), select the variable (C) with the multi-value field in the Structure.
Create the Web Content based on the previous Web Content Template.
On the Fragment-supported page (Content Page, Display Page Template, etc.) add the Fragment.
On the sidebar panel, click the Selection () button and choose the element in the Fragment you want to map.
Under the Mapping section, select and map the Web Content Article that contains the value you want to map.
Click the Field dropdown menu and select the Web Content Template you created before.
Click Publish to save the changes.