Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unlcms/tims
Drupal module to create Twig templates in the browser
https://github.com/unlcms/tims
drupal-7 drupal-module
Last synced: 5 days ago
JSON representation
Drupal module to create Twig templates in the browser
- Host: GitHub
- URL: https://github.com/unlcms/tims
- Owner: unlcms
- License: gpl-2.0
- Created: 2013-06-07T18:16:32.000Z (over 11 years ago)
- Default Branch: 7.x-1.x
- Last Pushed: 2020-07-23T13:37:19.000Z (over 4 years ago)
- Last Synced: 2024-11-07T18:35:06.571Z (about 2 months ago)
- Topics: drupal-7, drupal-module
- Language: PHP
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.txt
- License: LICENSE
Awesome Lists containing this project
README
TIMS: Twig Interface Management System
Drupal 7 module that enables the creation of Twig templates within the browser.
See INSTALL.txt for installation instructions.
-----------------------
Usage:
Manage templates at "Structure->Twig templates".-----------------------
Naming your templates:
Naming convention is based on what is contained in the theme_get_suggestions array.
For example, if you would like to template a node of the article content type,
instead of creating a php file named "node--article.tpl.php" you will create a
template in the module's interface called "node__article". See
https://drupal.org/node/223440 for more about working with template suggestions
and their naming convention.-----------------------
Twig syntax:
For a guide to the Twig syntax, refer to the documention for theming Drupal 8
(https://drupal.org/node/1906384) which uses Twig for theming as part of core.-----------------------
Differences between Drupal 8 theming and this module:Drupal 8 Twig syntax needs to modified when printing a field. The variable
needs to wrapped in the render function and the raw filter must be applied:Drupal 7 TIMS Module: {{ render(content.body)|raw }}
Drupal 8: {{ content.body }}