- Drupal 8 Module Development
- Daniel Sipos
- 184字
- 2021-07-02 12:22:46
Twig
Theme engines are responsible for doing the actual output via template files. Although previous versions of Drupal were capable of using different theme engines, one stood out and was used 99.9 percent of the time (statistic made up by me on the spot): PHPTemplate. This theme engine used PHP files with the .tpl.php extension and contained both markup and PHP. Seasoned Drupal developers grew accustomed to this practice, but it was always more difficult for frontend developers to use and theme against.
In Drupal 8, it was abandoned in favor of the Twig templating engine created by SensioLabs (the people responsible for the Symfony project). As mentioned, theme functions were also deprecated in favor of outputting everything through a Twig file. This brought about many improvements to the theme system and quite some joy to the frontend community. For example, it has improved security and readability, and has made it much less important to be actually versed in PHP to be able to take part in the theming of a Drupal site.
All Twig template files in Drupal 8 have the .html.twig extension.
- Spring 5.0 Microservices(Second Edition)
- Java程序設計(慕課版)
- Python測試開發入門與實踐
- 游戲程序設計教程
- Python應用輕松入門
- 精通網絡視頻核心開發技術
- Drupal 8 Configuration Management
- Building RESTful Python Web Services
- Programming with CodeIgniterMVC
- iPhone應用開發從入門到精通
- HTML+CSS+JavaScript網頁制作:從入門到精通(第4版)
- 從零開始學Selenium自動化測試:基于Python:視頻教學版
- Anaconda數據科學實戰
- SAP Web Dynpro for ABAP開發技術詳解:基礎應用
- Practical Linux Security Cookbook