Robin S Posted June 12, 2019 Posted June 12, 2019 Repeater Images Adds options to modify Repeater fields to make them convenient for "page-per-image" usage. Using a page-per-image approach allows for additional fields to be associated with each image, to record things such as photographer, date, license, links, etc. When Repeater Images is enabled for a Repeater field the module changes the appearance of the Repeater inputfield to be similar (but not identical) to an Images field. The collapsed view shows a thumbnail for each Repeater item, and items can be expanded for field editing. Screencast Installation Install the Repeater Images module. Setup Create an image field to use in the Repeater field. Recommended settings for the image field are "Maximum files allowed" set to 1 and "Formatted value" set to "Single item (null if empty)". Create a Repeater field. Add the image field to the Repeater. If you want additional fields in the Repeater create and add these also. Repeater Images configuration Tick the "Activate Repeater Images for this Repeater field" checkbox. In the "Image field within Repeater" dropdown select the single image field. You must save the Repeater field settings to see any newly added Image fields in the dropdown. Adjust the image thumbnail height if you want (unlike the core Images field there is no slider to change thumbnail height within Page Edit). Note: the depth option for Repeater fields is not compatible with the Repeater Images module. Image uploads feature There is a checkbox to activate image uploads. This feature allows users to quickly and easily add images to the Repeater Images field by uploading them to an adjacent "upload" field. To use this feature you must add the image field selected in the Repeater Images config to the template of the page containing the Repeater Images field - immediately above or below the Repeater Images field would be a good position. It's recommended to set the label for this field in template context to "Upload images" or similar, and set the visibility of the field to "Closed" so that it takes up less room when it's not being used. Note that when you drag images to a closed Images field it will automatically open. You don't need to worry about the "Maximum files allowed" setting because the Repeater Images module overrides this for the upload field. New Repeater items will be created from the images uploaded to the upload field when the page is saved. The user can add descriptions and tags to the images while they are still in the upload field and these will be retained in the Repeater items. Images are automatically deleted from the upload field when the page is saved. Tips The "Use accordion mode?" option in the Repeater field settings is useful for keeping the inputfield compact, with only one image item open for editing at a time. The "Repeater item labels" setting determines what is shown in the thumbnail overlay on hover. Example for an image field named "image": {image.basename} ({image.width}x{image.height}) https://github.com/Toutouwai/RepeaterImageshttps://modules.processwire.com/modules/repeater-images/ 15 5
Jonathan Lahijani Posted June 13, 2019 Posted June 13, 2019 Very nice. For context, this is like custom fields for images by using repeaters. This request for custom fields for images natively is one that is open, and slated for core one day:https://github.com/processwire/processwire-requests/issues/21 https://processwire.com/about/roadmap/ Quote Add support for custom properties in file/image fields. Currently just description and tags are supported, but it's clear there is strong interest in supporting more here, so we look forward to adding this. 4
markus_blue_tomato Posted June 13, 2019 Posted June 13, 2019 Nice module - I also wait for custom properties very hard. It's on the roadmap since late 2017. I hope @ryan has some time for this soon. 1
Juergen Posted July 16, 2019 Posted July 16, 2019 Thanks for this!! I think this is one thing that is much more important today because you have to add image credits to the site. So this should be part of the core. 2
Jonathan Lahijani Posted August 1, 2019 Posted August 1, 2019 I'm using this now on a site that needs that extra level of metadata. It's working great. Thank you. 2
gmclelland Posted August 6, 2019 Posted August 6, 2019 Hi Robin, Thanks for making this module. Just wanted to let you know that I ran into an error when I tried to export a repeater field: Let me know if I can provide any other information. 2
Robin S Posted August 6, 2019 Author Posted August 6, 2019 @gmclelland, thanks for the report, should be fixed in v0.1.1. 3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now