Question on contentfragmentlist. | Community
Skip to main content
jezwn
Level 5
February 6, 2024
Solved

Question on contentfragmentlist.

  • February 6, 2024
  • 2 replies
  • 910 views

I was exploring Adobe's Contentfragmentlist and came across an implementation below,
https://wcmauthorguide.illinois.gov/templates-and-components/content-fragments/list-content-fragment.html
Does the OOTB configuration support linking to pages, assets etc, or should that be a customisation? Upon reviewing the standard offering, I found that the multiline (RTE) component was the only method available for connecting assets/pages. However, it lacks the feature to hyperlink a title or the entire content.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

@jezwn 

The Content Fragment is meant to be used in Headless context as well. Thus, its form-based and fields are separate from each other.

 

If we wish to render the CF or CF List in a certain way, we would need to customize the HTL.

 

Like in this they have tried to render content of a linked CF https://kiransg.com/2021/11/13/aem-get-linked-content-fragments-content/

And here an adaptive Image via CF: https://kiransg.com/2021/11/12/aem-content-fragment-with-image-support/ 

2 replies

February 6, 2024

You can use 'Content Reference' data type in content fragment model to link any kind of internal AEM resources in your content fragment instances. You can also limit those reference per mimetypes, images max width / height, etc..

jezwn
jezwnAuthor
Level 5
February 6, 2024

@jfournel  The 'content reference', I don't think it appears as hyperlinks while rendering in the page. What I'm looking at is a similar implementation to the reference I've shared and I would like to understand whether I'm missing something or is it a customisation.

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
February 8, 2024

@jezwn 

The Content Fragment is meant to be used in Headless context as well. Thus, its form-based and fields are separate from each other.

 

If we wish to render the CF or CF List in a certain way, we would need to customize the HTL.

 

Like in this they have tried to render content of a linked CF https://kiransg.com/2021/11/13/aem-get-linked-content-fragments-content/

And here an adaptive Image via CF: https://kiransg.com/2021/11/12/aem-content-fragment-with-image-support/ 

Aanchal Sikka
kautuk_sahni
Community Manager
Community Manager
February 16, 2024

@jezwn Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni