Expand my Community achievements bar.

SOLVED

How to create a site level configuration dialog which contains properties to be applied for entire site?

Avatar

Level 3

I have a requirement to create certain page level and site level configuration dialogs which will be authored to apply some properties at the page level and site level respectively. The page level properties can be authored through the page properties dialog by adding a few of my own fields in the page properties dialog, but I need to have a site level dialog which may need to be used before the creation of any pages and it applies these properties to all pages in the site. The main use of these properties is for the JSON data which will be sent to another API, so that means if I author some values in the site level dialog, these properties must appear at every page when I access the infinity.json for that page. How do I create such a dialog and where do I create this dialog in CRXDE?

1 Accepted Solution

Avatar

Correct answer by
Level 10

You may use granite:rendercondition for your use case. There are a lot of examples/links in web. I've pasted just one here for reference:

How to show/hide page properties based on template in AEM 6.4 | Perficient Digital

Implement it based on any business logic that you've thought of..

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

To configuration site, you can go for osgi configuration.

configure either from repository or web console.

or you can explore context aware configuration. Apache Sling :: Apache Sling Context-Aware Configuration

Thanks

Arun



Arun Patidar

Avatar

Level 3

I also thought of the same thing but I need to create a dialog for site level configuration. I noticed that in AEM 6.4 the We Retail site uses a different page properties dialog at the top level We Retail page and a different dialog for the child pages. The child page dialogs inherits values from the parent page and we are able to cancel inheritance from parent dialog. I need to do something like this and my site level and page level dialogs have different tabs and fields too.

1695519_pastedImage_0.png

The above is the We Retail page properties dialog. Directly under this page are the country pages (us, ca, ch, de etc.) and these pages also have the same dialog with no inheritance.

1695520_pastedImage_1.png

The above dialog is from the language pages onward. They have an extra tab called "Live Copy" which means somewhere a new tab has been added to the page properties dialog, which makes it a different dialog from the site level page properties, and also author can cancel inheritance for individual fields.

Avatar

Correct answer by
Level 10

You may use granite:rendercondition for your use case. There are a lot of examples/links in web. I've pasted just one here for reference:

How to show/hide page properties based on template in AEM 6.4 | Perficient Digital

Implement it based on any business logic that you've thought of..