Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Content Fragments Use-Cases?

Avatar

Level 3

Hello,

I was studying the new feature of AEM, "Content Fragments", introduced in AEM 6.2 and further enhanced in 6.3, however I am not very clear about the actual use-cases of the Content Fragments and need more insight.

1.  The Content Fragments are suitable for long article pages or news pages, but I don't think it can be used for all types of authoring right?

2.  Suppose, we have Article Pages and News Pages in our website, both of which are created everyday, so authors can create those as Content Fragments instead of authoring those as pages? Is that right? And once the authors have created the content fragments, are we required to write some workflows/event listeners which automatically create pages for them?

3.  Also, as Content Fragments are only about content and not layout, so we need some component which will take its content and render it in the required layout. What happens when we want different layout for different content fragments for Article and News Pages? Also, in a dialog we can ask author to provide the summary text, description, author, date and article body, which is displayed on the page, however how will these different fields be written in a content fragment and how will component recognize which part is what?

I have some other questions as well, however, the above three would help in really understanding the actual use-case scenarios, for which this feature was created.

Regards,

Gaurav

1 Accepted Solution

Avatar

Correct answer by
Administrator

What it content fragment :- Adobe Experience Manager Help | Understanding AEM Content Fragments

Helpx article :- https://helpx.adobe.com/experience-manager/using/content-fragments.html

Content Fragments VS Experience Fragments https://helpx.adobe.com/experience-manager/kt/platform-repository/using/content-fragments-experience...

Content Fragments and Experience Fragments comparison

Content Fragments (CF)
Definition
  • A Content Fragment (CF) is editorial/semantic copy and media. Content Fragments require AEM Component(s) render in an experience.
Core Tenants
  • Text-based content, often long-form.
  • The text is the canonical content; CF metadata, mixed-media and associated assets are not sufficient to logically represent the the CF.
  • Requires the channel to provide style, layout and design.
  • Content-first, channel-second world view.
Variations
  • Within the CF itself, the Master variation acts as the canonical variation.
  • Variations tend to be summarizations of the Master variation.
  • Variations are use-case specific, which may or may not align with channels.
Re-use
  • Content Fragments can be used in XF via CF components.
  • Sync, Diff and Summarization tooling optimizes CF variation creation and maintenance.
  • Supports translation/localization by AEM.
Delivery
  • Requires OOTB CF components to render on AEM.

I hope this helps.

~kautuk



Kautuk Sahni

View solution in original post

7 Replies

Avatar

Level 8

I think the point of content fragments was to be able to create pieces of content that could potentially be used in multiples places, with or without slight variations, and house them in a single location, rather than prior where you'd need to use a reference component and have the author navigate the node structure to find what they're looking for.

To attempt to answer your questions:

1.  They can be used for anything, long articles, short blurbs, it really doesn't matter the length of the text.  You just need to make sure that your component can consume them.

2.  I don't believe this is the case.  Content fragments are separate from pages, they are more of an asset than a page.  Once the content fragment is created you would still need to create the page and have a component that consumes the content fragment.

3.  Again, content fragments are simply pieces of text, and like you said have nothing to do with layout, therefore, if you want a different layout, that comes down to the styling and HTML you provide for the component where you're using the content fragment.  You need to think of them as separate entities.  For the question about multiple fields, each of those fields could be a content fragment and you simply include that fragment into the component, rather than utilizing dialog fields.

Avatar

Level 3

Thanks leeasling for the reply. I would like discuss more on this topic.

Suppose, an author wants to create an Article Page -

1. In the traditional way, the author would drag the article component on the page and would be asked to fill fields such as author, date, title, short desc and for the article body, the dialog will have a rich text editor field where author can create the article. Now using the content fragments, our Article component will have just one field for selecting the relevant Content Fragment, right? Now in this case, as you mentioned for multiple fields, if there is a separate content fragment, then Article component needs to have multiple fields for selecting content fragment. Is there any other approach possible in this case? If no, then I am not able to see any advantage of designing our Article component based on content fragments, instead of traditional approach.

2. Usually it is seen that the content is not duplicated within a site, so where does content re-usability come into the picture, except for header and footer content?

3.  In general, are there any real-world use-cases known where the content fragments have been used in real project implementations?

Avatar

Level 8

1.  You're correct.  I think the point is that the content itself is located centrally and available for other authors to see, can be controlled by permissions, and you can create snippets based off of a content fragment and variations of a content fragment.  From an authoring standpoint I don't believe there is any benefit as far as the number of fields, just that for other authors the content can be viewed centrally without navigating the site to find it.

2.  Again, good question.  Language variations and snippet variations I believe are what the intent is here.  The only use case I could potentially see for re-using the exact same piece of content would be something along the lines of you have content in your main website, now you create a landing page that needs to use the same text as one of the pages - now you manage it one central location.  Other than that I don't believe re-use of the same exact content would come into play.

3.  I can only speak from personal experience, but yes, I have seen implementations with it where every piece of content on the website are content fragments.  The site also took advantage of the new lay-outing/templates within AEM 6.2 (which I'm also not a fan of, the process of setting them up is very convoluted and tricky for something you can do with the old style templates, plus the lay-outing system in AEM isn't great).

Avatar

Level 3

Hi gauravs23​, re: #3, we have used something similar to content fragments in our project. (similar because we are still on a version prior to 6.2). We have two separate sites that both contain biographies. The biographies (text) are the same but the page layouts are different. Because we have the biographies sit outside of the site structure as "content fragments" we can author them outside of the sites and publish. So instead of authoring two pages, you would just be authoring one. My understanding is this is how content fragments are intended to be used. Just a thought...

Avatar

Correct answer by
Administrator

What it content fragment :- Adobe Experience Manager Help | Understanding AEM Content Fragments

Helpx article :- https://helpx.adobe.com/experience-manager/using/content-fragments.html

Content Fragments VS Experience Fragments https://helpx.adobe.com/experience-manager/kt/platform-repository/using/content-fragments-experience...

Content Fragments and Experience Fragments comparison

Content Fragments (CF)
Definition
  • A Content Fragment (CF) is editorial/semantic copy and media. Content Fragments require AEM Component(s) render in an experience.
Core Tenants
  • Text-based content, often long-form.
  • The text is the canonical content; CF metadata, mixed-media and associated assets are not sufficient to logically represent the the CF.
  • Requires the channel to provide style, layout and design.
  • Content-first, channel-second world view.
Variations
  • Within the CF itself, the Master variation acts as the canonical variation.
  • Variations tend to be summarizations of the Master variation.
  • Variations are use-case specific, which may or may not align with channels.
Re-use
  • Content Fragments can be used in XF via CF components.
  • Sync, Diff and Summarization tooling optimizes CF variation creation and maintenance.
  • Supports translation/localization by AEM.
Delivery
  • Requires OOTB CF components to render on AEM.

I hope this helps.

~kautuk



Kautuk Sahni

Avatar

Level 2

Hi @kautuk_sahni 

How can we add few fields from a content fragment (not whole CF) in a component sling model which is included in some field having multifield structure.

Avatar

Level 2

Kautuk, food for thought.  People who are asking questions have already read the documentation.  While providing links can be helpful, the likelihood is that we've already read those.  Simply repasting excerpts from the articles, as you have done twice here, also is not helpful.  Providing detailed, contextually relevant insights in a down to earth manner that actually addresses the user's question without jargon is indeed helpful.  Thanks.