Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Volt Concat Variable

Hello..

How to concate volt variable like this:

$var = 'abc';

$var .= 'def';

$var .= 'ghi';

echo $var; output: abcdefghi

Thanks



7.4k
Accepted
answer
edited Mar '15

depending on Volt documentation it should be something like this:

{% set var = "abc" %}
{% set var = var ~ "def" %}
{% set var = var ~ "ghi" %}