How to Create a new componentgroup in AEM via a service | Community
Skip to main content
New Participant
November 2, 2015
Solved

How to Create a new componentgroup in AEM via a service

  • November 2, 2015
  • 3 replies
  • 2067 views

Hi all,

We have a requirement where we need to create a custom component group via a Java service. This service will be responsible of reading a list of components and adding those in the custom Group.

The purpose is to display only the configured components in the sidekick irrespective of the templates selected. We know AEM provides OOTB etc\design functionality but just want to know if anyone in the forum has come up with any such scenario.

 

Thanks,

Shikha

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 Peter_Puzanovs

Hey Shikha,

You want to modify components that appear in sidekick(e.g. modify what appears in the first part of sidekick) correct?

Simply, create a Sling filter on top of /libs/wcm/core/content/components.1446482347879.json endpoint.

So, that after result is being generated by the parent servlet, your custom filter get's executed and filters resulting JSON data as you see it needed for your requirement.

Thanks,

Peter

3 replies

varshsr
New Participant
November 3, 2015

I guess you can try this add a component group property via sling post either as curl or custom http  client depending on what you need

assuming cq:component  is /apps/components/sample/ you can add componentGroup - name via post

Peter_Puzanovs
Peter_PuzanovsAccepted solution
New Participant
November 2, 2015

Hey Shikha,

You want to modify components that appear in sidekick(e.g. modify what appears in the first part of sidekick) correct?

Simply, create a Sling filter on top of /libs/wcm/core/content/components.1446482347879.json endpoint.

So, that after result is being generated by the parent servlet, your custom filter get's executed and filters resulting JSON data as you see it needed for your requirement.

Thanks,

Peter

Lokesh_Shivalingaiah
New Participant
November 2, 2015

I dont think you have any service to create component group. Once you get the list of components you want to show in the sidekick, add the property componentGroup fro each of the components. That should automatically take care. 

However, I dont think we should have such configuration done via service.