by
KK » Mon Oct 01, 2012 12:07 am
@martijn
I see that you are trying to use editable region of type 'thumbnail' as a 'repeatable' region. This, sadly, is not possible and the thumbnail's definition will simply be ignored.
Had a 'thumbnail' region been available for use as 'repeatable' region, your problem would have been solved as 'thumbnail' editable region provides the user the option to choose the quadrant to create the thumbnail from (e.g. top-left or bottom-right etc.).
So, I am afraid, no easy solution to your problem for now.
I can only suggest that, in all probability, there would be only one instance of the slideshow that you are creating.
If that is so, we can create it using the regular cloned pages instead of the repeatable regions.
For example, we could have a template (say named slideshow.php), define two editable regions within it - one main image and other a thumbnail associated with the main image, and then create a cloned page for each slide in the slideshow.
The trick here would be to use the 'thumbnail', instead of the main image, to create the slideshow (i.e. use the crop='1' and the required dimensions with the thumbnail while providing no dimensions to the main image).
This way the client can upload image of any dimensions into 'image' region but then use the control provided by the 'thumbnail' region to tweak the resulting thumbnail that will be used in the slideshow.
@potato
As you mentioned, images inserted directly within the richtext region cannot be manipulated like those uploaded using dedicated editable regions.
Usually there is some kind of a limit that needs to be imposed on such images that appear free-form interspersed with the text e.g. there could be two acceptable sizes.
One way of doing this could be by using 'dummy' repeatable regions - e.g. we can have two repeatable regions each having an editable region of type 'image' with the size constrains imposed.
The client then, instead of inserting image directly within the richtext editor, uses the proper repeatable regions to upload images and pastes the path that appears here into the richtext editor's 'insert image' dialogbox.
When the page is saved, the images get resized as specified.
On the front-end we simply ignore these repeatable regions.
Just a thought.