Skip to content

Commit 6f361ba

Browse files
committed
bug #8804 [Templating] Add the asset package requirement (michaelperrin)
This PR was merged into the 4.0 branch. Discussion ---------- [Templating] Add the asset package requirement New comers will get an errors if they use the `asset()` Twig function without installing the `asset` package. This PR makes sure they won't get an "WTF" reaction to the error they would get ;) Commits ------- 47494ba Templating docs: add the asset package requirement
2 parents e6b494d + 47494ba commit 6f361ba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

templating.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,15 @@ Linking to Assets
738738

739739
Templates also commonly refer to images, JavaScript, stylesheets and other
740740
assets. Of course you could hard-code the path to these assets (e.g. ``/images/logo.png``),
741-
but Symfony provides a more dynamic option via the ``asset()`` Twig function:
741+
but Symfony provides a more dynamic option via the ``asset()`` Twig function.
742+
743+
To use this function, install the *asset* package:
744+
745+
.. code-block:: terminal
746+
747+
$ composer require asset
748+
749+
You can now use the ``asset()`` function:
742750

743751
.. configuration-block::
744752

0 commit comments

Comments
 (0)