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

SOLVED

Override Content Fragment List Core Component Dialog

Avatar

Level 1

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
Level 4

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.

View solution in original post

0 Replies

Avatar

Correct answer by
Level 4

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.

Avatar

Level 1

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.