Extra Block Types (EBT) - New Layout Builder experience❗
Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.
❗Extra Paragraph Types (EPT) - New Paragraphs experience
Extra Paragraph Types (EPT) - analogical paragraph based set of modules.
Twig in Drupal
Menu
- Understanding Drupal
- Drupal System Requirements
- Installing Drupal 8
- Drupal 8 Update
- Drupal Site Administration
- Drupal 8 Modules
- Drupal Modules Comparison
- Drupal Themes
- Drupal field types
- Configuration Management
- Multisite Drupal
- Accessibility Features
- Troubleshooting in Drupal
- Creating modules for Drupal
- Drupal 8 API
-
Theming in Drupal
- Define a theme using file .info.yml
- Theme folder structure in Drupal
- Adding a region in theme
- Add CSS and JavaScript (JS) in Drupal theme
-
Twig in Drupal
- Working with Twig templates
- Twig Template Naming Conventions
- Comparison of PHPTemplate and Twig Paradigms
- Find and check variables in Twig template
- Debug Twig template
- Debugging Compiled Twig Templates
- Debugging Twig templates
- Filters - Changing variables in Twig templates
- Functions in Twig templates
- Macros in Twig templates
- Best Practices for Twig – Preprocess Functions and Templates
- Creating Custom Twig Templates for a Custom Module
- Extending templates
- Subthemes
- Subtheme: Using Classy as a Base Theme
- Classy themes css selectors
- Including Default Image Styles with Your Theme
- Include template
- Using attributes in templates
- Preprocessing and modifying attributes in the .theme file
- Working with Breakpoints in Drupal 8
- Creating Advanced Theme Settings
- Theme Differences Between Drupal 6, 7, and 8
- Updating Classes from 7.x to 8.x
- Inheritance in subtheme
- Creating Automation Tools for Custom Themes (Gulp.js)
- Instructions for converting Drupal Twig (tpl.php to html.twig)
- Z-index in Drupal
- Upgrade to Drupal 11
Twig is a templating engine for PHP and is part of the Symfony2 framework.
In Drupal 8, Twig replaces PHPTemplate as the default templating engine. As a result of this change, all theme_* functions and *.tpl.php files based on PHPTemplate have been replaced by *.html.twig template files.
Note that Drupal 8 currently uses Twig version 1.x. However, Drupal 8.7 and later are compatible with Twig 2.x. Some Twig features differ between these versions, so theme developers should avoid deprecated Twig features to ensure future compatibility.
Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.