Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 716 Bytes

templating-exclamation.md

File metadata and controls

16 lines (13 loc) · 716 Bytes

Template exclamation syntax

This templating tweak introduces the ! syntax. Inspired by Symfony issue 1966 and Twig issue 1334.

(Please keep in mind this will totally ignore the bundle inheritance and just use the original bundle.)

Example

{# app/Resources/MyBundle/views/layout.html.twig #}
{% extends "!MyBundle::layout.html.twig" %}

{# override you block here #}

The code above extends the example src/MyBundle/Resources/views/layout.html.twig and not its self (default twig + symfony behaviour).