Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36335c7

Browse files
committed
passing arguments to filter example
1 parent 3970ba8 commit 36335c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cookbook/templating/twig_extension.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ Using your newly created Twig Extension is no different than any other:
109109
{# outputs $5,500.00 #}
110110
{{ '5500' | price }}
111111

112+
Passing other arguments to your filter:
113+
114+
.. code-block:: html+jinja
115+
116+
{# outputs $5500,2516 #}
117+
{{ '5500.25155' | price(4, ',', '') }}
118+
112119
Learning further
113120
----------------
114121

0 commit comments

Comments
 (0)