smarty->setTemplateDir( [ 'admin' => NN_THEMES.'shared/templates/admin', 'shared' => NN_THEMES.'shared/templates', 'default' => NN_THEMES.'Omicron/templates', ] ); if (! isset($this->userdata['user_roles_id']) || (int) $this->userdata['user_roles_id'] !== Users::ROLE_ADMIN || ! $this->users->isLoggedIn()) { $this->show403(true); } $category = new Category(); $this->smarty->assign('catClass', $category); } /** * Output a page using the admin template. * * @throws \Exception */ public function render(): void { $this->smarty->assign('page', $this); $admin_menu = $this->smarty->fetch('adminmenu.tpl'); $this->smarty->assign('admin_menu', $admin_menu); $this->page_template = 'baseadminpage.tpl'; parent::render(); } }