i have a component A.
Now i should create a component B. The requirement is there will be image in Component B. when you click on it ComponentA should pop out
Can some one suggest me efficient way to do it !!!
Thanks
Views
Replies
Total Likes
Maybe try something like this
<div class="component-a"> <div class="component-b" data-sly-resource="${'image' @ resourceType='wcm/foundation/components/image'}"> </div> </div> <script type="text/javascript"> (function () { $('.component-a').on('click', function () { //Do something with component-b > img here }); }); </script>
Views
Replies
Total Likes
Hi leeasling
Will te dialog,html and styling of component A will be included in component B if I use this code?
Views
Replies
Total Likes
Do not this as assume permanent include.
Lets says,
You have two separate component A and component B.
Once you include B in A using code shared above. When ever you get component A on page you will see B will be included in it.
But still Component B will be rendered by it's own resource type and Component A will be rendered by it's own resource type.
Views
Replies
Total Likes