protected function before() { if (Cookie::get('is_admin') == 1) { $this->view->set('is_admin', 1); } $this->view->helpers->set('block', 'Hook\\CMS\\Helper::block'); $this->view->setTemplatesDirectory(__DIR__ . '/views'); }
protected function before() { $this->view->setTemplatesDirectory(__DIR__ . '/../views'); $this->setLayout(Cookie::get('is_admin') == 1 ? 'admin/authenticated' : 'admin/unauthenticated'); }