nowo_twig_inspector key in your YAML config file. The bundle works with default values even if no configuration file exists — you only need to set what you want to change.
Full example
Options reference
Extensions
List of template file extensions to inspect. Only templates whose filename ends with one of the listed extensions are processed.Default:
['.html.twig']Template exclusions
Template names or patterns to exclude from inspection. Supports wildcards with
*.Default: []Additional template exclusion patterns as regular expressions. Applied in addition to
excluded_templates.Default: []Template name prefixes to exclude. Useful for excluding entire Twig namespaces or directories.Default:
[]Block exclusions
Block names or patterns to exclude from inspection. Supports wildcards with
*. Useful for excluding large blocks such as inline JavaScript or CSS.Default: []Additional block exclusion patterns as regular expressions.Default:
[]Behaviour
Enable collection of template usage metrics in the Symfony Web Profiler DataCollector. When enabled, the profiler panel shows statistics about templates and blocks used in each request, including render counts and timing data.Default:
trueWhen
true, the bundle also injects HTML comments during sub-requests (for example when the main content is rendered as a fragment via {{ render(controller(...)) }}). Enable this if all your templates show “sub-request” in the panel and none get inspected.Default: falseName of the browser cookie used to enable or disable the inspector. Change this if the default name conflicts with another cookie in your application.Default:
'twig_inspector_is_active'Maximum nesting depth for HTML comment injection. Set to
0 for unlimited depth. Reducing this value can lower overhead on very deep or highly recursive template trees.Minimum: 0 (unlimited)Default: 0Overlay UI
Visual theme for the overlay tooltip.Accepted values:
'light', 'dark', 'auto' (follows the system’s prefers-color-scheme).Default: 'light'Use compact tooltip style for the overlay. When
true, the overlay tooltip takes up less screen space.Default: falseRespect reduced motion for accessibility. When
true, or when the system reports prefers-reduced-motion, overlay animations are minimized.Default: falseKeyboard shortcut to toggle the inspector overlay. Set to an empty string to disable the shortcut entirely.Default:
'Ctrl+Shift+T'Routes configuration
In addition to thenowo_twig_inspector YAML config, the bundle requires its routes to be imported in config/routes.yaml. This is handled automatically by the Flex Recipe or the install command, but you can add it manually if needed.
admin/users/list.html.twig). Security validations in the controller prevent path traversal attacks.
The bundle handles route generation gracefully if routes are not available — it returns a fallback URL instead of throwing an exception, so it is safe in non-dev environments even if misconfigured.
