Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to change Image Field order

Avatar

Level 1

I want user to be able to change the hierarchy order of two (or more) ImageFields:

- When click a button, ImageField2 is on top of ImageField1.

- When click another buttom, ImageField1 is ontop of ImageField2.

Is there any kind of script to do that?

Thanks.

2 Replies

Avatar

Level 10

Hi,

No, I don't thinl you can change the z-order at runtime. You can move objects up/down and across the page (x/y), but not placing objects in the front or behind (afaik).

Niall

Avatar

Level 2

Two perspectives are there

I perspective - If you wish only heirarchy to be changed, you can put both the image fields one above other inside a flowable subform and make both hidden. Do make a small difference in height of two images so that when heirarchy is made automatic, it will read from top to bottom. Make sure that difference in height is very minor so that user doesn't make out that there is any difference in position of both the images.

II Perspective - A bit complex solution involving 3 buttons. You can control z order at runtime. Using this solution you can make an image appear or disappear on top of another image. In other words you can control z order.

Thanks,

Arjun