Skip to content

Commit

Permalink
minor #4181 clarify that macros shadow other macros/functions (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.x branch.

Discussion
----------

clarify that macros shadow other macros/functions

see #4175 (comment)

Commits
-------

e1a9448 clarify that macros shadow other macros/functions
  • Loading branch information
fabpot committed Aug 8, 2024
2 parents 390c5a0 + e1a9448 commit 9252578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/tags/macro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ via the ``from`` tag:
.. caution::

As macros imported via ``from`` are called like functions, be careful to
not override existing functions:
not shadow existing functions:

.. code-block:: twig
Expand Down Expand Up @@ -113,7 +113,7 @@ Imported macros are not available in the body of ``embed`` tags, you need
to explicitly re-import macros inside the tag.

When calling ``import`` or ``from`` from a ``block`` tag, the imported macros
are only defined in the current block and they override macros defined at the
are only defined in the current block and they shadow macros defined at the
template level with the same names.

Checking if a Macro is defined
Expand Down

0 comments on commit 9252578

Please sign in to comment.