We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

[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



98.9k

Hi, you have to concatenate the variable:

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


12.1k

Works perfect. Thanks!