/** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { SibdietHelper::addSubmenu('cpanel'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Get list of sibdiet buttons $this->buttons = SibdietHelper::getButtons(); $this->addToolbar(); parent::display($tpl); }