Jump to content

Adding Images to a Repeater Element


porl
 Share

Recommended Posts

Hi guys

Just a quick question.

When adding an image to an image field inside a repeater, the image gets added to an invisible page (/processwire/repeaters/forfield......).

I understand why this is done, but if there is another field (a text block in this case for an article 'body') in the same repeater element the 'insert image' button cannot find it (it defaults to listing images associated with the page rather than the repeater element).

Is there an easy way to allow simple insertion of images into blocks within a repeater element?

Thanks

Link to comment
Share on other sites

Not entirely sure, but when I first tested the image field etc in a repeater I expected the tinymce image button to display images from that by default. The second thing I expected was that the images added to these embedded image fields would be browsable from the image button's dialog.

Not to say the current behaviour is 'wrong', just not what I expected. Perhaps making it easier to find images from repeater fields when browsing in the image window would be the primary thing, but the default behaviour to me should be to show images in the related area first and then perhaps an 'other images on this page' option in the dialog.

Sorry I'm not wording this very well, my brain seems to have gone for a walk.

Link to comment
Share on other sites

  • 4 months later...

I also ran into this problem today. There does not seem to be any way to access a file or image from the TinyMCE insert file / image dialog when using a repeater. The only way to get around this issue is to add a file or image field to the main page (outside of the repeater).

I would say the expected behaviour would be to first look for file / image fields within the repeater, then look for files / images outside the repeater (the main page). I am not sure you would ever want to access files / images from another repeater row.

Should we add this as an issue to Github?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...