Problem/Motivation
I'm creating a content type to use as a photo gallery. It would be nice to have a FieldFormatter with WxT that automatically formats a Media field to use Lightbox as described in the wet-boew Lightbox working example - https://wet-boew.github.io/v4.0-ci/demos/lightbox/lightbox-en.html
Steps to reproduce
I created a simple content type for this, and added a Media field with unlimited cardinality. The bulk media creation already in WxT works well, it allows me to upload multiple photos at the same time and it converts them into media entities and attached them to my field:
Adding bulk images:

Bulk media entity creation:

Bulk media added to field:

Now I don't have a field formatter to display the resulting photo gallery in a WET Lightbox.
Proposed resolution
Add a new FieldFormatter to display a simple Lightbox photo gallery, like image below.

Add settings to the FieldFormatter to allow selection of image styles, one for the small preview image and one for the large image rendered in Lightbox:

| Comment | File | Size | Author |
|---|---|---|---|
| #4 | wet-lightbox-field-formatter-3520518-4.patch | 5.79 KB | smulvih2 |
| #3 | view-result.png | 151.86 KB | smulvih2 |
| #3 | wet-lightbox-views.png | 30.24 KB | smulvih2 |
| wxt-photo-gallery-settings.png | 23.63 KB | smulvih2 | |
| wxt-media-gallery.png | 85.69 KB | smulvih2 |
Comments
Comment #2
smulvih2The patch adds the WET Lightbox FieldFormatter to the
wxt_ext_media_imagemodule.Comment #3
smulvih2So now I added my Media field to a view, and I get the FieldFormatter with the config form:
And the resulting view displays the thumbnails with lightbox as expected:
Comment #4
smulvih2New patch accounts for translated alt text in the lightbox.
Comment #5
smulvih2Comment #6
joseph.olstadVery nice work!
Comment #7
smulvih2Tagging this with OCOL.
Comment #8
smulvih2This will be included in next release. We have been using this field formatter for a few months now with OCOL and it's working great!
Comment #11
smulvih2Included in 6.1.2.