I have two includes on my sightly template (all files created by the Eclipse plugin):
<div data-sly-resource="${image @ resourceType='wcm/foundation/components/image', cssClassName='hero-img mdl-shadow--2dp'}" data-sly-unwrap></div>
This one renders some kind of default image:
<img src="/etc/designs/default/0.gif" title="Box" class="cq-dd-image" data-emptytext="Image">
The other is a text include: <div data-sly-resource="${text @ resourceType='wcm/foundation/components/text'}" data-sly-unwrap></div>
Renders this:
<p class="cq-text-placeholder-ipe" data-emptytext="Text"></p>
File I'm using is: apps/mysite/components/structure/page/partials/main.html
I can't figure out what I'm doing wrong. Why won't these open author dialogs?
Solved! Go to Solution.
Views
Replies
Total Likes
Remove the "data-sly-unwrap" - you're unwrapping the element that's needed for editing.
Views
Replies
Total Likes
Hi Paul,
I am not quite clear with your question here.As far as I understand , you have got a page component in which you are including two resources one is text component and another is image.
But when you open the page , text component is showing up but it is not showing dialog box .
If I got your question right. Then it's a weird behaviour and only reason which I can think of is you might be in Preview mode.
Views
Replies
Total Likes
What version of AEM are you using?
Views
Replies
Total Likes
Remove the "data-sly-unwrap" - you're unwrapping the element that's needed for editing.
Views
Replies
Total Likes
You hit it on the head @leeasling
I removed the data-sly-unwrap and I put the predicate in single quotes.
So this is the result:
<div class="hero-img mdl-shadow--2dp" data-sly-resource="${'image' @ resourceType='wcm/foundation/components/image'}"></div>
<div data-sly-resource="${'text' @ resourceType='wcm/foundation/components/text'}"></div>
v6.2 BTW
Views
Replies
Total Likes