public function display($tpl = null) { // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); return false; } ProfileHelper::addSubmenu('profile'); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); } parent::display($tpl); }