Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Media Entity Twig

3 sites Security covered
View on drupal.org

This module allows you to use Twig templates as media items within Drupal. This enables you to reuse custom-built interactive components as media, similar to how you would use images or videos, making them available anywhere media can be placed on your site.

The Media Entity Twig module provides a powerful way to add Twig templates, content and components as media items that can be re-used anywhere you can add media.

This can be useful if you've built interactive components that you want to feature instead of more traditional media such as images and video.

This module is designed for Drupal 10.3+ and is ideal for theme developers, frontend engineers, site builders and anyone needing to add twig things to be used and reused as media items.

Usage:

  1. Require the module into your project via Composer: composer require drupal/media_entity_twig.
  2. Enable the module in the UI: /admin/modules#module-media-entity-twig or via drush: drush en media_entity_twig
  3. Go to media types /admin/structure/media and you will see a new media type called Twig.
  4. A default twig field is automatically added with default field settings. You can now customise or add additional fields at /admin/structure/media/manage/twig/fields
  5. You can now add media of type twig in addition to the default media types such as image and video.

Additional Requirements

This module requires Drupal's core image, media, media_library, and path modules as well as the contrib module twig_field.

Community Documentation

I will provide a YouTube walkthrough of the functionality this module provides soon!

Supporting organisation

Pivale are a globally trusted web development company who build Drupal CMS websites and software.

Activity

Total releases
6
First release
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
1.0.0 Stable Jun 9, 2025
1.0.0-beta2 Pre-release May 30, 2025
1.0.0-beta1 Pre-release May 30, 2025
1.0.0-alpha2 Pre-release May 28, 2025
1.0.x-dev Dev May 28, 2025
1.0.0-alpha1 Pre-release May 28, 2025