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

Volt error compiling macro

I have a volt file, and this line is generating an exception:

Phalcon\Mvc\View\Exception: Syntax error, unexpected token ENDMACRO()

{%- macro ancestorPermissions(permissions) %} 
{%- endmacro %}

That's not truncated code - it's the actual code that's generating the error.

What am I missing?



58.4k

Hey

I don't know that, but If you replace code to


    {%- macro ancestorPermissions(permissions) %}
    <div>
        <span class="error-message">{{ permissions }}</span>
    </div>
    {%- endmacro %}

It will working :)