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

What is the recommended approach for saving configuration/properties of subcomponents in the JCR when they are dropped/added to a page for the first time


Level 7


We have a few components that look like this:

<% // some scriptlet %> <!-- the component --> <div class="header"> <cq:include path="logo" resourceType="acme/components/content/logo"/> <cq:include path="social-icons" resourceType="acme/components/content/social-icons"/> </div>

The idea is that in order to keep the Edit Dialog of the header component small, it includes a few sub components such as logo, social icons, etc. each having their own respective Edit Dialogs.

However when this component is initially dropped on to the page, the respective default properties of the component are not stored in the JCR.

For example, for the logo component, in the _cq_editConfig.xml we have something like this:

<cq:formParameters jcr:primaryType="nt:unstructured" config1="x" config2="y" />

But this only comes into effect when the logo component is dropped on to the page, and not the header component.

I can copy something similar to this in the header component's _cq_editConfig.xml, but is there a way to avoid this duplication?


0 Replies