I upload a image through damadmin, because of oob workflow the image was rendered into 5 different pixels under image->jcr:Content->Rendition->image pixels.
How can i use that rendition images directly in dialog without manual mapping.
Thanks in advance
Solved! Go to Solution.
I hope you should be able to select child nodes by adding the below property.
predicate="nosystem"
Views
Replies
Total Likes
What software are you using? You've posted in the non-support, general forum Lounge. Users from all of Adobe's clouds hang out here. If you let us know what software you're using, a moderator can move your post to the right forum. As it is, I don't know if you're talking about something in Business Catalyst, Acrobat, InDesign, Dreamweaver, or something else.
Views
Replies
Total Likes
im using aem 6.1
Views
Replies
Total Likes
moved to Adobe Experience Manager
Views
Replies
Total Likes
Hi prabhu,
What do you mean by direct use. Can you please elaborate?
Views
Replies
Total Likes
Hi Susheel,
In dialog for mapping the image i'm using image path filed. In properties I have mentioned the root path for the path field. While clicking on it,it makes me to choose the images of node.Here how can i choose the rendition images .
Views
Replies
Total Likes
I hope you should be able to select child nodes by adding the below property.
predicate="nosystem"
Views
Replies
Total Likes
There is no OOTB way to use the image field in a dialog and utilize a rendition. You would need to add some custom Java code to get the rendition based on the image. If you're using the image field in your dialog, you can do something like this (this hasn't been tested, just a guideline).
public String getImageRendition() {
Image image = new Image(this.getResource(), "image");
if (image != null && image.hasContent()) {
Asset imageAsset = image.adaptTo(Asset.class);
if (imageAsset != null) {
Rendition rendition = imageAsset.getRendition("renditionName");
if (rendition != null) {
return rendition.getPath();
}
}
}
return null;
}
This obviously assumes you're saving your image node as "image" and you're using the image field. One word of caution - i'm not sure it's a good idea to expose the direct path to the image rendition to the public, but ultimately that's a business decision.
I agree with lasling . To add to that adding below a snippet from one of my project (modified accordingly, Please make sure to use constants in a seperate class.)
As a part of our requirement , we passed the node to get the asset and fetched the required rendition accordingly.
Why the rendition is set in the above manner is because, when this is published via dispatcher , assume your rendition path is /content/dam/geometrixx/documents/GeoCube_Datasheet.pdf/jcr:content/renditions/cq5dam.thumbnail.48.48.png ; then in dispatcher , it will create a folder structure as below
content
--> geometrixx
--> documents
-->GeoCube_Datasheet.pdf
--> jcr:content
-->renditions
-->cq5dam.thumbnail.48.48.png
And so in your publisher end, if you try to access your page via dispatcher with image renditions, none of your images will be loaded and directly hitting those images over dispatcher will throw you 404. Hence , to skip this behavior , we refer any rendition in below format to access it over dispatcher
/content/dam/geometrixx/documents/GeoCube_Datasheet.pdf/jcr:content/renditions/cq5dam.thumbnail.48.48.png this should be referred as /content/dam/geometrixx/documents/GeoCube_Datasheet.pdf.thumb.48.48.png
Views
Replies
Total Likes
Views
Likes
Replies