Using Volt in CLI Application

Is there a possibility to use volt in a CLI Application using Phalcon?

I don't get it... I'll try it like this:

$content = $view->pick('myview')->start()->render('index', 'index', array())->finish();

The problem is that render needs some params so it tries to compile not that view which I want to. I get the following error (Pathname's cutted):

Notice: Access to undefined property tag in \app\cache\app_views_index.volt.php on line 4

Fatal error: Call to a member function getTitle() on null in \app\cache\app_views_index.volt.php on line 4


185

Chmod \app\cache to 777



2.5k

You must be trolling.

Try using getRender():

$content = $view->pick('myview')->getRender('index', 'index', array());


44.8k

Use simple views (not the normal controller/action views). I use simple views for things like email templates. I don't think that the normal views are relevant for things that are not directly run from the controller/action.