What the frontend? Get the most out of Twig, render arrays and D8's caching
summary
Covers concrete, actionable items: Twig syntax and filters, use embed for reusable templates, and how to enable twig debug in sites/default/services.yml to see candidate override names. Shows a live site that renders an external donate form and CAPTCHA via twig functions plus a custom dynamic header that works. Explains render arrays (keys with # are special), common types like markup/plain_text, and Drupal 8 caching with cache tags, cache contexts, and max-age and how tag bubbling makes per-user blocks force unique page caches.
AI-written summary · about
chapters (19)
- 0:00Intro
- 5:16Twig Syntax: HTML & JavaScript
- 8:58Twig Syntax: Twig Functions
- 10:15What are Twig Filters?
- 14:43Embed - best of include & extends
- 16:42Custom Overrides
- 19:10Twig file custom override suggestions
- 23:03Best Twig Var Debugging
- 25:12Twig Tweak!
- 28:22Rendering in Page Lifecycle
- 30:24Format & Structure
- 31:28Render Elements
- 32:36Render Array Example
- 34:00Examples: #markup
- 34:17Examples: #plain_text
- 34:59Examples: #type: checkbox
- 36:45Caching Considerations
- 37:04Drupal Cache Tags
- 37:30Custom caching configuration
related talks
43m[T]alking about [W]hat [I]s [G]reat about TWIG
17mDive deep into Drupal 8 Render API
53mState of Drupal 8 frontend
07mCreating Twig Extensions
01h 01mDrupal 8 theme best practices - here's where we burried the bodies
41mCaching Like a Pro: Best strategies for dealing with Drupal cache
54mTaming Twig
37mTalking Twig
