twig
969 sites
Security covered
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
- CTools
- Libraries API
- Twig (place it in
sites/all/libraries/twigorsites/<domain>/libraries/twig
Usage
- Go to
admin/structure/twig/addand create a template or two - Go to
admin/config/content/formatsand 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.