Post

Twig Debugging Drupal

Use twig debug to see what templates are actively being used by the page you are viewing. This helps front and developers apply CSS classes and HTML markup to required template files.

Twig debug also outputs many suggestions for templates that you could use in regards overriding the default templates.

alt text

Enable twig debug

In Drupal 10 switching on twig development mode is a lot easier as it’s built in to the core admin area.

Just go to /admin/config/development/settings And enable twig debug mode.

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.