Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If you need templates to be recompiled every time, enable the compileAlways option option in Volt's settings. In this case, the cache files will still be created, but each time anew, regardless of whether there were changes in them or not.
$di->set('view', function(){
$view = new \Phalcon\Mvc\View();
$view->setViewsDir('../app/views/');
$view->registerEngines(array(
'.volt' => function($view, $di) {
$volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di);
$volt->setOptions(array(
'compiledPath' => '../app/compiled/',
'stat' => true,
'compileAlways' => true
));
return $volt;
}
));
return $view;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question