AEM 6.2 took a giant leap towards channel independent authoring by introducing Content Fragments. Now using AEM 6.2, one can author content without creating a Page. The text content is authored and managed in AEM Assets and is called a Content Fragment. Content Fragments can then be used in various channels like web pages, mobile apps, screens or campaigns.
What constitutes a Content Fragment?
A Content Fragment contains text segments and references to assets, likes images, videos, and/or fragments. They are independent of the delivery mechanism (i.e. page, channel) and can have variations of master elements to adjust fragment text according to the specific editorial or channel requirements. Think about these as content variation for various channels. I like to think of them as Responsive content!! Though Content Fragments are channel agnostic, they have a well defined content structure. One can define the structure in a Content Fragment template – structure is completely configurable.
Why should one use a Content Fragment?
As we know, in a professional setup, most of the times, content is authored by editorial staff and then it is layout by a production layout specialist. Content fragments allows authors to write content without having to worry about the layout. While writing one should write independent of the layout. In addition, one should think about how the same message gets conveyed on multiple channels – that’s all what Content Fragment authoring is all about.
Later, a Layout/Production specialist can associate the content fragment with components according to the channel and make sure the content is layout looks appealing. In addition, while binding a content fragment with the component, one can choose amongst the available content variations.
How to create a Content Fragment?
Content Fragments can be authored using AEM Assets. To create a Content Fragment, browse to the Assets Home and choose to create a Content Fragment (refer screenshot below)
Next, select the template and click Next. Out of the box, AEM ships with a “Simple Fragment” template. For any meaningful Content Fragments, one will need to create a template according to one’s needs.
Once a Content Fragment has been created, you can Edit it to author text.
You shall see the WYSIWYG text editor. You can author content here.
In addition to Rich text, you can also author content in either of the other two additional text formats supported in AEM 6.2 – a) Plain text and b) Markdown (https://en.wikipedia.org/wiki/Markdown)
How can I author Variations?
You can click on the Variations in the left hand panel and create as many variations as you want. In the screenshot below, you shall see that I have created four variations, one each for Mobile, Tablet, Screens and Web (Master).
Each Variation can have different text.
How can I add images in the Content Fragments?
Unfortunately, AEM 6.2 doesn’t allow you to add inline images. Instead, you can add images as references. In order to do so, select “Edit” on the top left corner and select “Associated Images”.
As the name suggests, you can associate any “Lightbox Collection”, managed in AEM Assets.
Next, we will deep dive into Content Fragment templates and see how you can create them and use them for authoring Content Fragments. I will cover that in the next Blog post.