Files
Twig/doc/filters/replace.rst
T
2011-09-27 08:43:35 +02:00

15 lines
363 B
ReStructuredText

``replace``
===========
The ``replace`` filter formats a given string by replacing the placeholders
(placeholders are free-form):
.. code-block:: jinja
{{ "I like %this% and %that%."|replace({'%this%': foo, '%that%': "bar"}) }}
{# returns I like foo and bar
if the foo parameter equals to the foo string. #}
.. seealso:: :doc:`format<format>`