TWIG: is it possible to have two filters or variable in variable? -


i want following

{% set checkicon = '<a id="{{ participant.id }}">' %}  <td>{{ checkicon | raw }}</td> 

it doesnt word because twig variable in twig variable-definition not possible. heard doing somthing this

<td>{{ checkicon | replace({ '{{ participant.id }}': participant.id }) }}</td> 

but have problem want add raw-filter too. possible add 2 filters twig variable? didnt found on net.

ty in advance!

try this. ~ token concatenation strings.

{% set checkicon = '<a id="' ~ participant.id ~ '">' %} 

Comments