Jump to content

Recommended Posts

Posted

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

Posted

This "bug" has already been reported by me in the repeater thread, though nobody seems to recognized or understand it.

Thx for bringing this up

Posted

I guess I could work around it for now with a "page wide" images field at the end of the repeaters, but it would be nice to have some sort of separation between elements.

Posted

Soma & porl: what would be best way to handle this in your opinion? I can think few quite a different options how this can be fixed.

Posted

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.

  • 4 months later...
Posted

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?

Posted

I have gone ahead and added this capability to the dev branch. Now pages with repeaters can access images within the repeaters, and repeater pages can access images from their containing pages.

  • Like 4

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
  • Recently Browsing   0 members

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