Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Twig Input Filter

970 sites Security covered Drupal 10–11 Twig ecosystem
View on drupal.org

This module integrates the Twig template engine into Drupal, allowing you to create and manage Twig templates through the Drupal UI. These templates can then be used as an input filter for content, enabling dynamic content rendering.

Provides the Twig template engine as an input filter. Twig templates are stored as CTools Exportables, so you can edit them from the UI, and export them as Features Components.

Dependencies

Usage

  • Go to admin/structure/twig/add and create a template or two
  • Go to admin/config/content/formats and activate Twig on an input filter
  • Create a node using the Twig input filter. Use the Twig syntax {% include 'template_name' %} to include a template.

Future Development

I'm interested in extending this module to integrate Drupal and Twig in other ways. Feel free to post feature request issues with your thoughts and/or code. In particular, I'd like to add support for Tokens as Twig variables, and set up the Twig sandbox to restrict privileges for users having access to Twig-enabled input formats.

Related

Depends on

Dependencies of the latest stable release

  • filter Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.3 Stable 10–11 Apr 8, 2025