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

Passing variable in partial (volt)

I need to pass $categ which is taken from controller. The following code work well. The problem is that I'm trying to be consistent in volt.

<?php $this->partial("blocks/categoryListBrowse", array('title' => 'Browse by Categories', 'parent_id' => "$categ", 'column' => '2')) ?>

The following code does not work:

{{ partial("blocks/categoryListBrowse", ['title': 'Categories1', 'parent_id': '$categ']) }}


404

It should be:

{{ partial("blocks/categoryListBrowse", ['title': 'Categories1', 'parent_id': categ]) }}

Without quotes and "$" symbol.