RsD0p9BK
5/11/2016 - 11:09 AM

From http://twig.sensiolabs.org/doc/filters/replace.html

{{ "I like %this% and %that%."|replace({'%this%': foo, '%that%': "bar"}) }}

{# outputs: I like foo and bar if the foo parameter equals to the foo string. #}
{# http://stackoverflow.com/questions/4943880/str-replace-in-twig #}