Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi there,

I am struggling to find a solution for next problem.
I have a repeatable region with a couple of images
Is there a way to automatic give a <div> a (portrait or landscape) class according to the image.
If it was a gallery i would do this with the Exif data, are there other solutions?

Thanks.
Hi,

Unlike gallery, repeatable-region has to filled in manually.
So, I think, you can define an extra child editable region (e.g. a checkbox or dropdown) where the person inputting data can also specify if the image being added is portrait or landscape.

On the frontend, you may use that region's value to output the desired class.

Hope this helps.
KK wrote: Hi,

Unlike gallery, repeatable-region has to filled in manually.
So, I think, you can define an extra child editable region (e.g. a checkbox or dropdown) where the person inputting data can also specify if the image being added is portrait or landscape.

On the frontend, you may use that region's value to output the desired class.

Hope this helps.


Hi KK,

Thanks for the reply.
I was already thinking about doing it like this, but is there no "automatic" way to do this?

Thanks.
3 posts Page 1 of 1
cron