VAVANG INVOICE / DOCS / EN

Templates and admin UI

Vavang Invoice integrates its admin screens through Sylius Twig Hooks and bundle templates. Prefer hook-level customization before copying complete plugin templates.

Public hook names used by the plugin

The bundle currently contributes content to these hooks:

  • sylius_invoice_admin.compliance_dashboard.index;
  • sylius_invoice_admin.compliance_document.index.

Both reuse the standard Sylius Admin sidebar and navbar and provide their own content template.

Preferred override: replace the hook contribution

A host application can replace the content contribution in its Sylius Twig Hooks configuration:

# config/packages/sylius_twig_hooks.yaml
sylius_twig_hooks:
    hooks:
        'sylius_invoice_admin.compliance_dashboard.index':
            content:
                template: 'admin/invoice/dashboard/content.html.twig'
                priority: 0

This keeps the application coupled to the documented hook name rather than to the internal structure of the original Twig file.

The document-list hook can be customized in the same way with sylius_invoice_admin.compliance_document.index.

Bundle template override

The default dashboard content currently lives at:

@SyliusInvoicePlugin/admin/dashboard/content.html.twig

Symfony bundle overriding can shadow it from the host application with:

templates/bundles/SyliusInvoicePlugin/admin/dashboard/content.html.twig

The compliance-document list currently uses @SyliusInvoicePlugin/admin/dashboard/list_content.html.twig.

A full template copy has a higher BC cost: markup, variables and partial structure may evolve even when the route and hook remain stable. Use this technique only when a hook replacement or composition is not sufficient.

What not to rely on

Do not treat every file below templates/admin/dashboard/ as an independently stable extension contract. Files such as configuration.html.twig, errors.html.twig, health.html.twig and reporting fragments are implementation templates unless explicitly documented otherwise.

Upgrade checklist

After changing a hook or overriding a bundle template:

  1. render the affected admin route in an integration test;
  2. verify required variables still exist after a plugin upgrade;
  3. test keyboard and responsive behavior;
  4. compare against the upstream template before accepting a new plugin version.