Make modal content more general

Created on 28 May 2024, 7 months ago

Problem/Motivation

Currently, the modal content only works with Remote videos. It would be nice if it was more general and could render out any field on the media entity. That way the module isn't tied to the field_media_oembed_video field. This request is similar to https://www.drupal.org/project/media_video_micromodal/issues/3362497 ✨ Request Support for Custom Media Types Needs work

Steps to reproduce

n/a

Proposed resolution

Instead of getting the attributes for the iframe, just render out a field

Remaining tasks

See patch and branch

User interface changes

  • Add a setting called Modal Content to the field formatter
  • The field to render will have to be enabled on the Mange Display tab

API changes

Instead of the twig template hard coding in an iframe, render out the field as a variable

Data model changes

Add the new Modal Content setting to the field formatter

✨ Feature request
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States yonghua

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

Comments & Activities

Production build 0.71.5 2024