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 - Include assign vars

Is there a usual way to assign variables specially for the template using "include"?

{% include "path/to/template.volt" %}

I think if you are using {% include %} most of the time you include a partial template (let's say a variable x is included) into the main template and then $this->view->setVar("x", what you define as x ) in your main controller.

edited Aug '15

{# Passing extra variables #}
<div id="footer">{% include "partials/footer" with ['links': links] %}</div>

edited Aug '15

Well, thank you Lajos Bencz. :)
BTW.: Sorry for the bad vote.. my mistake x)