Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How can I use the rendition images in dialog??

Avatar

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
prabhukarruppus
Level 2

03-08-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 4
susheel
Level 4

Likes

60 likes

Total Posts

109 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
susheel
Level 4

Likes

60 likes

Total Posts

109 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
susheel
Level 4

06-08-2017

I hope you should be able to select child nodes by adding the below property.

predicate="nosystem"

predicate.png

Answers (7)

Answers (7)

Avatar

Avatar
Give Back 5
Level 2
lasling
Level 2

Likes

9 likes

Total Posts

22 posts

Correct Reply

4 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Level 2
lasling
Level 2

Likes

9 likes

Total Posts

22 posts

Correct Reply

4 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
lasling
Level 2

07-08-2017

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.

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

07-08-2017

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

Avatar

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
prabhukarruppus
Level 2

06-08-2017

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 .

Avatar

Avatar
Validate 1
Level 4
susheel
Level 4

Likes

60 likes

Total Posts

109 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
susheel
Level 4

Likes

60 likes

Total Posts

109 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
susheel
Level 4

06-08-2017

Hi prabhu,
What do you mean by direct use. Can you please elaborate?         

Avatar

Avatar
Level 1
Ussnorway
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Ussnorway
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Ussnorway
Level 1

06-08-2017

moved to Adobe Experience Manager

Avatar

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
prabhukarruppus
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
prabhukarruppus
Level 2

06-08-2017

im using aem 6.1

Avatar

Avatar
Boost 3
Level 1
Szalam
Level 1

Likes

3 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
Szalam
Level 1

Likes

3 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
Szalam
Level 1

04-08-2017

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.