Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Twig Input Filter

Security covered Under active development 915 sites

Part of the Twig ecosystem · 43 projects

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

Drupal 10–11

Ask your assistant about Twig Input Filter

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
2
Tracked since
Jan 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Active

Releases

Version Type Core PHP Release date
2.0.3 Stable 10–11 Apr 8, 2025
2.0.2 Stable 8–10 Jan 29, 2023