Using Component Model data to show/hide fieldset in component Dialog | Community
Skip to main content
April 7, 2020
Solved

Using Component Model data to show/hide fieldset in component Dialog

  • April 7, 2020
  • 3 replies
  • 5637 views

Hi guys so I have a task and I am not just looking for a solution, but hopefully the most efficient. So I have a component that needs to get data (boolean variable) for the page/template properties then using that, we can show/hide certain fields within the dialog.

 

So let's say in the template I am using I have a checkbox with a property that says include feature, now what I want is for a particular component, Say heading&summary to be able to grab that page property and use it to show/hide options on my Heading&Summary component.

 

How can I achieve this? I stumbled up a granite feature renderCondition and I am not sure if this is one of the case I can use, say maybe implementing "Simple" condition. 

 

You assistance would be appreciated. thanls

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 Theo_Pendle

Hello,

. I wrote a tutorial on creating custom render conditions (can be done in 10 mins) here: https://levelup.gitconnected.com/aem-creating-custom-granite-render-conditions-28a21958f420. In the tutorial you will learn to show or hide a component property in the edit dialog based on the navigation title of the containing page (you can then quite easily change it to consider a different page property of your choosing).

Hope it helps 👍

3 replies

Theo_Pendle
April 7, 2020
Hi, I decided to turn my answer into a tutorial. I sent it off for publication, should be ready in -+/ 24h 🙂
Theo_Pendle
Theo_PendleAccepted solution
April 8, 2020

Hello,

. I wrote a tutorial on creating custom render conditions (can be done in 10 mins) here: https://levelup.gitconnected.com/aem-creating-custom-granite-render-conditions-28a21958f420. In the tutorial you will learn to show or hide a component property in the edit dialog based on the navigation title of the containing page (you can then quite easily change it to consider a different page property of your choosing).

Hope it helps 👍

April 8, 2020
Thanks, sounds like what I am looking for, about to have a read so I will give an update ASAP