diff --git a/docs/book/configuration/currencies.rst b/docs/book/configuration/currencies.rst index 336e721285f..af6fbd087fe 100644 --- a/docs/book/configuration/currencies.rst +++ b/docs/book/configuration/currencies.rst @@ -71,6 +71,22 @@ the ``Sylius\Component\Core\Currency\CurrencyStorageInterface`` with methods $container->get('sylius.storage.currency')->set($channel, 'PLN'); +Displaying Currencies in the templates +-------------------------------------- + +There are some useful helpers for rendering money values in the front end. +Simply import the money macros of the ``ShopBundle`` in your twig template and use the functions to display the value: + +.. code-block:: twig + + .. + {% import "@SyliusShop/Common/Macro/money.html.twig" as money %} + .. + + {{ money.format(price, 'EUR') }} + +Sylius provides you with some handy :doc:`Global Twig variables ` to facilitate displaying money values even more. + Learn more ----------