[SOLVED] Volt Variable in Tag

Hi Community,

I want to have a variable in the link href but this ends in an error:

{{ link_to("my/link/{{ variable }}", "Mein Link") }}

Hope you can help me.

best regards Eike



82.2k

Hi, you have to concatenate the variable:

{{ link_to("my/link/" ~ variable, "Mein Link") }}


7.7k

Works perfect. Thanks!