Presented at Drupal Camp Asheville 2016
Originally planned as an introduction to Drupal 8 theme development with Twig, this quickly became a very in-depth guide to many important aspects for building a complete theme.
This presentation covers the following aspects of theme development in Drupal 8
- Anatomy of theme file system
- Creating your first Drupal 8 theme
- Twig templates, and where to find them
- Twig syntax
- Working with template suggestions
- Modifying content with
hook_preprocess()
- Drupal render arrays
- Custom templates with
hook_theme()
Guide to Drupal 8 Theme Development
Download presentation as PDF: Introduction-to-Drupal-8-Theme-Development
References & Resources
Twig
Twig & Drupal
Render Array Resources
- Drupal 8 Render Arrays API – General overview of render arrays
- Drupal 7 Form API – Though the API is technically for Drupal 7, these
properties also apply to Drupal 8. - Render Array Snippets – Oldie but a goodie
- Drupal 7 Examples module – render_examples submodule
Discussion
Great guide. Thanks.