How to create a site level configuration dialog which contains properties to be applied for entire site? | Community
Skip to main content
vigiaemnewbie
Level 2
February 19, 2019
Solved

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

  • February 19, 2019
  • 3 replies
  • 1909 views

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?

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 Gaurav-Behl

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..

3 replies

arunpatidar
Community Advisor
Community Advisor
February 19, 2019

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
vigiaemnewbie
Level 2
February 20, 2019

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.

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.

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.

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
February 20, 2019

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..