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

Can't get the object methods in a volt template

I'm trying to access an object method inside a volt template but I don't know why in one template I can while in another I can't. I tried to dump the object inside the template and it works, but I can't access its variables. Code:

<div class="tags-wrapper">
   <div class="tags-column">
        {% for tag in result['tag_list'] %}
            {{ tag.getName() }}
        {% endfor %} 
    </div>
</div>


461

Solved, "tag" is a keyword. I just replaced it with something different and it works.



43.9k

Hi,

mark your answer as accepted so that the thread appears to be solved.