function display($tpl = null) { $app = JFactory::getApplication(); $this->state = $this->get('State'); $this->pagination = $this->get('Pagination'); $model = new EstivoleModelServices(); $layout = $app->input->get('layout', 'edit'); switch ($layout) { case "edit": $this->service = $model->getItem(); default: $this->services = $model->listItems(); break; } EstivoleHelpersEstivole::addSubmenu('services'); $this->sidebar = JHtmlSidebar::render(); $this->addToolbar(); //display return parent::display($tpl); }