This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

nathandunn
nathandunn

Hi,

In the rainlab/relax-theme, there is a component to allow a backend user to pick a file from the pages plugin using the media manager . However, at the moment, you are only able to select one file at a time from the media manager. The Twig code is as follows {variable tab="Header" type="mediafinder" mode="image" name="banner" label="Banner image"}{/variable}. I was wondering if anyone has managed to get multiple uploads working?

Thanks in advance, Nathan :)

Last updated

marfat
marfat

Hey Nathan,

I managed to find a way around this by using the form type repeater and within the repeater form, use mediafinder as the type. For instance:

imagery: label: Images type: repeater form: fields: imagery: label: Image type: Cms\FormWidgets\MediaFinder mode: image

Dont forget to change the field to json in the model.

greg13278
greg13278

@marfat could you post an example?

marfat
marfat

Sure thing, here you go:

imagery:
    label: Images
    type: repeater
    form:
        fields:
            imagery:
                label: Image
                type: Cms\FormWidgets\MediaFinder
                mode: image

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.