Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nowo-tech/TwigInspectorBundle/llms.txt

Use this file to discover all available pages before exploring further.

How Twig bundle template overrides work

Symfony’s Twig integration checks your application’s templates/bundles/ directory before loading a bundle’s own views. Any file you place there with the correct relative path takes precedence over the original. The bundle name is derived from the PHP class name. For this bundle the class is NowoTwigInspectorBundle, so the override directory is:
templates/bundles/NowoTwigInspectorBundle/
Files inside that directory must mirror the path structure inside the bundle’s src/Resources/views/ directory.

Overridable templates

Relative path (from Resources/views/)Purpose
Collector/template.html.twigWeb Profiler full panel — the detailed view opened from the profiler.
Collector/toolbar_item.html.twigToolbar dropdown fragment — the icon, Enable checkbox, filter field, and shortcuts.

Example directory structure

To override both templates, create the following files in your project:
your-project/
└── templates/
    └── bundles/
        └── NowoTwigInspectorBundle/
            └── Collector/
                ├── template.html.twig
                └── toolbar_item.html.twig
Copy the originals from the vendor directory as a starting point:
# Web Profiler panel
cp vendor/nowo-tech/twig-inspector-bundle/src/Resources/views/Collector/template.html.twig \
   templates/bundles/NowoTwigInspectorBundle/Collector/template.html.twig

# Toolbar dropdown
cp vendor/nowo-tech/twig-inspector-bundle/src/Resources/views/Collector/toolbar_item.html.twig \
   templates/bundles/NowoTwigInspectorBundle/Collector/toolbar_item.html.twig
Edit the copies as needed. Only override the files you actually want to change.

Clearing the cache

After adding or modifying override files, clear the Twig cache so Symfony picks up the new templates:
php bin/console cache:clear
You only need to clear the cache once after adding a new override file. Subsequent edits to the file are picked up automatically in the dev environment because Twig’s auto-reload is enabled.
When upgrading the bundle, check whether the original templates have changed. Your override file will not automatically receive upstream changes — it’s a full replacement, not a patch.

Build docs developers (and LLMs) love