cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Passing variable in partial (volt)

Open dodyw opened this issue 13 years ago • 1 comments

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']) }}

dodyw avatar Aug 01 '13 01:08 dodyw

Drop the single quotes around $categ

ronaldcastillo avatar Aug 01 '13 20:08 ronaldcastillo