My Phalcon web-app has worked for a long time. I did some changes the last week, and suddenly strange things happends with my templates.
app/config/services.php:
$di->set('view', function () use ($config, $di) {
$view = new View();
$view->core = new \stdClass;
$view->core->breadcrumb = array();
});
BaseController.php:
public function appendBreadcrumb($url = false, $title = false, $fa_class = false) {
if($url) $url = $this->di->getUrl()->get($url);
$this->view->core->breadcrumb[] = array('url' => $url, 'title' => $title, 'class' => ($fa_class ? 'fa-'.$fa_class : false));
}
mytemplate.volt:
{% if core.breadcrumb %}
The volt-file gets compiled to php-file with the variable "$this->core->breadcrumb". This variables is NULL. But when I change the php-file to "$core->breadcrumb" it works. Any hints to solve this problem?