Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Extending Content Fragment List Component with a Custom Sling Model

Avatar

Level 4

I'm trying to figure out if if I can use a custom Sling Model to extend the Content Fragment List component to inject additional tags into the component properties without essentially recreating the entire structure. I have done this with lists to create what we refer to as a Smart List component by creating my own query and building the list. The structure of the Content Fragments is a bit more complex than a list, however, and I'm not as adept at building that. I've been able to rebuild the query pulling from the Java in core from com.adobe.cq.wcm.core.components.internal.models.v1.contentfragment.ContentFragmentList however everything blows up with DAMContentFragmentImpl. When I try to import com.adobe.cq.wcm.core.components.internal.models.v1.contentfragment.DAMContentFragmentImpl, my core bundle compiles but won't activate. 

 

jetate_0-1641596629651.png

 

All I'm essentially trying to do is pull tags from a page property and add them into the tags array for the component properties to generate a Content Fragment List. 

jetate_1-1641596756639.png

 

I've used custom sling models to extend other components to modify the titles being output in lists or breadcrumbs but this is more trying to enhance the current function rather than fully overriding it with a new option. I don't know if this is possible, but maybe someone with more experience with Java can understand what I'm trying to do and if it's possible.

0 Replies