Add block for displaying a specific Gallery with same layout options as Latest Gallery Items Block

Created on 13 October 2025, 6 days ago

Problem/Motivation

The "Latest Gallery Items" block displays items from all galleries, but there was no way to display a single, specific gallery in a block. This enhancement introduces a
new "Media Gallery" block that allows a user to select and display a single media gallery with the same layout and styling options as the "Latest Gallery Items" block.

Steps to reproduce

This is a new feature and does not address a bug.

Proposed resolution

A new block plugin, GalleryBlock, was created to provide the "Media Gallery" block. This block includes a configuration form where the user can select a specific media gallery from a dropdown list. The block reuses the same layout options and rendering logic as the LatestGalleryItemsBlock to ensure a consistent look and feel.

To support this new block, the following changes were made:
* A new media_gallery_gallery block was defined with its own schema.
* The CSS styles were updated to apply to the new block, ensuring correct layout and styling.
* A new functional test was created to verify that the block correctly displays the selected gallery and that the layout options work as expected.

Remaining tasks

None.

User interface changes

A new "Media Gallery" block is now available on the block layout page. When adding this block, the user can select a specific media gallery to display from a dropdown list in the block's configuration form.

API changes

There are no API changes.

Data model changes

A new schema, block.settings.media_gallery_gallery, has been added to media_gallery.schema.yml to support the configuration of the new "Media Gallery" block.

✨ Feature request
Status

Needs review

Version

3.2

Component

Default

Created by

πŸ‡ΊπŸ‡ΈUnited States circuitcipher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024