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

Override Content Fragment List Core Component Dialog

Avatar

Level 2

Currently the content fragment list core component is showing all the available content fragment models in its dialog dropdown for model. I need to override the model dropdown in content fragment list dialog and show only the content fragment models specific to a project/path. Any suggestion please on how can we implement this

Koustuva1_0-1656600213288.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Koustuva1 ,  

By default, all content fragments of the model defined as Model Path are included in the list. So you only have one option to override it.

But, You can override like this.

 

  • Write your own servlet with resourceType <yourproject>/contentfragmentlist
  • Create a ContentFragmentList component in your project, write cq:dialog with model node  Datasource pointing to above resourceType.
  • your Servlet will be just like this except at line 89 modify code like this, 

                  parameterMap.put("path", "/conf/<yourproject>")

 

 

Hope this will help,

~Aditya.

Thanks,

Aditya Chabuku

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @Koustuva1 ,  

By default, all content fragments of the model defined as Model Path are included in the list. So you only have one option to override it.

But, You can override like this.

 

  • Write your own servlet with resourceType <yourproject>/contentfragmentlist
  • Create a ContentFragmentList component in your project, write cq:dialog with model node  Datasource pointing to above resourceType.
  • your Servlet will be just like this except at line 89 modify code like this, 

                  parameterMap.put("path", "/conf/<yourproject>")

 

 

Hope this will help,

~Aditya.

Thanks,

Aditya Chabuku

Avatar

Level 2

Thank You  @arunpatidar and @Aditya_Chabuku

If we want to add both resourceType and Path as dynamically picked values will it be possible to handle.