Inherit a component in a page using sightly
hi All,
we have recently migrated from AEM 6.0 to AEM 6.3 and refactored the code in sightly. There is one scenarion i need help with.
we have a page :
/content/myproduct/global/en_US/index
This has components in it
/content/myproduct/global/en_US/index/jcr:content
- navigation
- logo
- search
- menu (sling:resourceType = foundation/components/iparsys)
- comp1 (sling:resourceType = cq:component)
- comp2 (sling:resourceType = cq:component)
- comp3 (sling:resourceType = cq:component)
In jsp we were including 'menu' in another page using: <sling:include path="/content/myproduct/global/en_US/index/jcr:content/menu" />
when we migrated to sightly we are including it using: <sly data-sly-resource="${@ path=/content/myproduct/global/en_US/index/jcr:content/menu, resourceType='foundation/components/iparsys'}"/>
This inclusion is working fine if we view the page but this is authorable in the page in which it is included using the data-sly-resource tag. As this is being included from another page, it should not be allowed to be authored. if we view the same page in classic UI and try to click on 'edit' to open the component dialog, it shows the dialog fields to be greyed out and there is a lock at the bottom left hand side to enable or disable the inheritance.
1. The behavior in classic UI is as expected but why does touch UI allows the component to be edited in the page where it is added as resource?
2. what are we doing wrong here w.r.t touch UI?
i tried the solution as mentioned by Feike Visser in this article: CQ INCLUDE and SLING INCLUDE in Sightly
Thanks for the help in advance.