The component should be editable only at the parent page.
The edited component should be inherited to all the child pages but should not be editable.
Solution:
Iparsys
Con:
An additional iparsys container appears in all the child pages, which confuses the author.
Alternative Solution:
1) Use a specific parent page template for parent page(E.g Homepage template)
2) Use a different template for child pages.
3) The parent template should include the component, which should have the dialog to make it editable.
4)Child template should include a component, which actually inherits from the parent component. This component should have the property as cq:noDecoration=true, which will make it noneditable in child template.
5)Now we are able to make the same component noneditable in child pages. But in order to inherit the content edited in parent pages into child pages, we need to use an additional Pojo, which can provide the property value from a parent page.
https://github.com/rodo1111/aem-sightly-workshop/blob/master/bundle/src/main/java/cr/prodigious/aem/sightlyworkshop/components/util/PropertyInherited.java
Pojo can be used in sightly as:
https://github.com/rodo1111/aem-sightly-workshop/blob/1ec106c1fbddd0b0d0d118373d8de0b7868fe991/content/src/main/content/jcr_root/apps/prodigious/components/global/content/footer-sly/footer-sly.html
No comments:
Post a Comment
If you have any doubts or questions, please let us know.