Hello Members,
I am trying to include parsys in my component to make way for authors to configure a component of their choice. But when this component is included in another component ( cascade include ) , the drop target does not get enabled unless dialog is opened and closed once. Most likely it expects the dialog open and close events to be fired before it enables itself. not sure how do I do that in my code.
I included the parsys like below :
<sly data-sly-resource="${'par' @@ resourceType=wcm/foundation/components/parsys'}"></sly>
root container
|--- parent component ( includes child )
|--- child component ( includes grand child which has parsys in it )
|--- grand child ( has parsys in its htl, by using resourcetype usage
I tried enabling the components at template level using policy but not sure if it its the correct solution , but I read a similar thread here and tried that. I think re-design will be an option I will think of but before that I wanted to understand is this a limitation or I am doing something wrong.
Please suggest.
Regards
Shailesh
P.S. its AEM 6.5 with latest service pack.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @ShaileshPa
You may need to include the proxy container component,
if you would include the core components as is you need to setup the policies etc.
If you want that childern nodes are created on first drag and drop then you need to use cq:template to create default nodes for a component
Hi,
I don’t think there is any limitation to embedding parsys within another parsys. However, you should be aware of couple of things. First, it is recommended to use a container component (from the core components) instead of using parsys directly. Second, the inclusion should be made clear. There are some caveats where the parsys inclusion can be problematic, such as including it without a wrapper (directly via a SLY tag), which could be what's happening in your case. Try including the parsys within a <div>
tag instead.
Lastly, embedding could get messy, so if possible you should try to avoid it especially when it involves several levels of depth.
Hope this helps!
Views
Replies
Total Likes
Hi,
To add to original post , I tried changing it to container component but the behavior did not change
I mean I tried this ==>
<sly data-sly-resource="${'par' @ resourceType='core/wcm/components/container/v1/container'}"></sly>
please refer the screen shot below:
before I open grandchild component dialog ( I dont see the option to add/drag component )
and later I am able to see once dialog is opened and closed
any suggestions ?
Also want to add another observation that the nodes do not get created on first component drop, but they only get created when the dialog of grand child is opened and closed.
Views
Replies
Total Likes
Hi @ShaileshPa
You may need to include the proxy container component,
if you would include the core components as is you need to setup the policies etc.
If you want that childern nodes are created on first drag and drop then you need to use cq:template to create default nodes for a component
Hi @ShaileshPa ,
You may have a look at https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/parsys-in-custom-component...
Also I can see double @ in the code you pasted
Thanks
Views
Replies
Total Likes
that @@ (twice) is a typo while putting details in case, its not there in the code .. plz ignore that
also can you suggest , which of these three should be marked for cq:isContainer ? currently all of them are marked as true for cq:isContainer.
Views
Replies
Total Likes
Hi @ShaileshPa ,
You can extend container component and override the required file where you want custom changes if any class or div
Thanks
Views
Replies
Total Likes
Views
Likes
Replies