We have multiple reps and for each rep we will have a bio that we are storing in content fragments. I want to include this bio on an AEM page based on a passed-in value. Each content fragment will be named according to a unique rep value, like a rep number.
For instance, the path would be something like /path/to/content/fragment/data/12345/master... where “12345” would be dynamic.
Is there a way to include the content fragment data within a custom component with HTL using something like data-sly-include or data-sly-resource or do I need to use JSON?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @JonMaguire,
Yes it's possible to include content fragment inside custom component using HTL. Please have a look into Content Fragment component form Core Components, which is a good example how this can be done:
Simply explore above implementation and adapt it to your specific use case.
Views
Replies
Total Likes
Hi @JonMaguire,
Yes it's possible to include content fragment inside custom component using HTL. Please have a look into Content Fragment component form Core Components, which is a good example how this can be done:
Simply explore above implementation and adapt it to your specific use case.
Views
Replies
Total Likes
Thanks, @lukasz-m for the quick reply.
So, it’s a little more involved than just adding an include, then. It’s more of a case of adding code in a similar way to the core CF component?
Thanks again for the insight.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies