added a doc note

This commit is contained in:
Fabien Potencier
2019-06-04 10:04:49 +02:00
parent eb9a3e245e
commit ee7be2e187
+6
View File
@@ -138,6 +138,12 @@ When calling ``import`` or ``from`` from a ``macro`` tag, the imported macros
are only defined in the current macro and they override macros defined at the
template level with the same names.
.. note::
Before Twig 2.11, it was possible to use macros imported in a block in a
"sub-block". When upgrading to 2.11, you need to either move the import in
the global scope or reimport the macros explicitly in the "sub-blocks".
Checking if a Macro is defined
------------------------------