1
votes

In symfony 2.8 I have parameter inside config - twig global - call: haryb_com_text_guides_index: '.....'

I want to use this variables like this:

    <p class="main">
        {{ 'my.description'|trans|nl2br|replace({'%link_start%': "<a href="{{ haryb_com_text_guides_index }}">", '%link_end%': '</a>'})|raw }}
    </p>

but I got 500 and: A hash value must be followed by a comma. Unexpected token "punctuation" of value "{" ("punctuation" expected with value ",").

Maybe some escape is wrong ?

1

1 Answers

0
votes
{{ 'my.description'|trans|nl2br|replace({'%link_start%': '<a href="'~ haryb_com_text_guides_index ~'">', '%link_end%': '</a>'})|raw }}