Hi All,
Doubts as below :
1] In any component, if I have to include another component then it has to have a parsys in it and nothing else is required, correct?
2] Also, I have seen that in many components the below is to be seen while including parsys, where "xxx" is different in different cases. Did go through couple of documentation but was not clear. What exactly does '@path' do here.
<div data-sly-resource="${ @path='xxx-parsys', resourceType='foundation/components/parsys'}"></div>
Any thoughts on this will be helpful.
Solved! Go to Solution.
1. In your component contains parsys then you can include any component inside it via drag n drop
[OR]
You can include a component in another component via code also like this
<div data-sly-resource="${ @path='par-text', resourceType='foundation/components/text'}"></div>
2. Once you get parsys on page, If you drag an drop any component inside it, then that will be saved under the node name which has been given in path='xxx-parsys',
Views
Replies
Total Likes
1. In your component contains parsys then you can include any component inside it via drag n drop
[OR]
You can include a component in another component via code also like this
<div data-sly-resource="${ @path='par-text', resourceType='foundation/components/text'}"></div>
2. Once you get parsys on page, If you drag an drop any component inside it, then that will be saved under the node name which has been given in path='xxx-parsys',
Views
Replies
Total Likes
Hi Praveen,
Thanks a lot for your reply.
One more doubt I have is,
1] I have included a parsys in the component and am able to include components. However, in the component html it is mentioned that certain components have to appear at certain locations.
For example :
<div> richtext component <div>
<div> richtext component <div>
<div> richtext component <div>
So, in the corresponding divs have included the component by <div data-sly-resource="${ @path='xxx', resourceType='aem/components/content/richtext'}" data-sly-unwrap></div>.
However, they are not editable when I click on them.
Can you please let me know as to what is it that I am missing here.
One more thing to add is that the dialog for the main component, where I am including other components has a dialog[wherein we have radiobuttons to select from around 6 colours]
Views
Replies
Total Likes
There might be something wrong in component you are trying to include.
I tried with OOTB text component, it works
Can you explain this, I didn't get
" One more thing to add is that the dialog for the main component, where I am including other components has a dialog[wherein we have radiobuttons to select from around 6 colours] "
Views
Replies
Total Likes
I mean the main component where I am trying to include other components[into corresponding divs in the component html] has a dialog wherein we can choose around 6 colours.
I just mentioned this because I was not sure if that had any role to play here.
Views
Replies
Total Likes
It should not be a problem, you can have different dialogs for nested component ( when one components is included inside another )
Views
Replies
Total Likes
Hi Praveen,
Ok, thank you for your reply.
So, if I understand correctly in my current scenario :
#1]component A which has its dialog. In this component html, I have to hard code certain components of the same type into corresponding div sections.
When I include the components, then ideally I should be able to edit them and nothing else to be done. Correct?
#2] In my case I am able to edit child components when I explicitly add from sidekick, but not the hardcoded ones[I do not even get the edit option when I hover over them].
Will try and see if I get something. In case I am missing something, please do let me know.
Views
Replies
Total Likes
1.Yes, to ensure try with the OOTB text component
** Make sure the component which u r trying to include in component html should have dialog
Views
Replies
Total Likes
Views
Likes
Replies