I am thinking about migrating an existing webpage to wagtail. However, a major part of the page are image galleries, with a total of some thousand images and some hundred galleries. Furthermore, the page is divided into several sites, with editors only allowed to change the content for one specific site.
Since the collections are not hierachical, they do not provide a convenient way to collect images into image galleries, the select boxes get confusingly long if their number grows.
I have defined a page
-derived class that contains ParentalKey
to images, which is sufficient to implement an image gallery. However, it is not very user-friendly to select, say, 200 images for the gallery one by one. Thus I thought I should extend the ImageChooserPanel
to something like aMultipleImageChooserPanel
, which would allow selecting and uploading multiple images. The code for uploading multiple images should be available in wagtail.
After reading the code for wagtailimages/views/multiple.py
, wagtailadmin/edit_handlers.py
and all the corresponding parent classes, I still do not see how the modal ImageChooserPanel
determines the selected image and how its id
is returned. Presumably, most of this happens in JS, however, I cannot find any hint where to look for the corresponding code, nor any hints on how to extend it.
Is it possible to extend the modal ImageChooserPanel
? Could anyone point me to a code snippet to start with?