Taming Twig
summary
Enables Twig debug by setting debug: true, auto_reload: true, cache: false in the services YAML, uses dump() and Devel/Kint but warns Kint can blow memory so prefers targeted dumps or the loop over _context to avoid the white screen, and recommends the contributed filters from the Twig Field Value module—especially field_target_entity and field_raw—to pull nested entity fields without preprocessors; checklist: clear caches, inspect template suggestions, check watchdog/reports, decide if error is in a preprocessor or the Twig file, increase PHP memory or show all errors.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:52Debugging Twig setup
- 6:38Debugging Twig tools
- 9:50Finding field values
- 13:05Using Twig filters
- 17:27Debugging content variables
- 20:35Twig field value module
- 25:56Avoiding PHP errors
- 29:29White screen of death
- 36:38Where to get advanced help
- 41:50Q&A
related talks
43m[T]alking about [W]hat [I]s [G]reat about TWIG
44mWhat the frontend? Get the most out of Twig, render arrays and D8's caching
37mTalking Twig
01h 01mDrupal 8 theme best practices - here's where we burried the bodies
49mLiving Styleguide in your Drupal projects: Benefit from component driven design.
24mOptimising React’s TTI
29mVite Devtools
29mBuilding Live HTML and Omniscient Debuggers in Brackets
