{# no work #}
{# index.volt #}
{% autoescape true %}
{% include "my_file" with [ 'object': my_object ] %}
{% endautoescape %}
{# my_file.volt #}
<div>{{ object.id }}</div>
{# work #}
{# index.volt #}
{% include "my_file" with [ 'object': my_object ] %}
{# my_file.volt #}
{% autoescape true %}
{{ '<div>' }}{{ object.id }}{{ '</div>' }}
{% endautoescape %}
I need the first option, how to do?
Tried through $compiler->addFunction()
, but the $exprArgs
return string
.