/** * Display this view, if in front-end, will show toolbar and submenus. * * @param string $tpl View layout name. * @param type $path The panel layout from? * * @return string Render result. */ public function displayWithPanel($tpl = null, $path = null) { $app = JFactory::getApplication(); $this->addToolbar(); $this->handleFields(); // if is frontend, show toolbar if ($app->isAdmin()) { parent::display($tpl); } else { parent::displayWithPanel($tpl, $path); } }
/** * Display this view, if in front-end, will show toolbar and submenus. * * @param string $tpl View layout name. * @param type $path The panel layout from? * * @return string Render result. */ public function displayWithPanel($tpl = null, $path = null) { $app = JFactory::getApplication(); // We don't need toolbar in the modal window. if ($this->getLayout() !== 'modal') { $this->addToolbar(); $this->sidebarFilter(); if (JVERSION >= 3) { $this->sidebar = JHtmlSidebar::render(); } } // Nested ordering if ($this->state->get('items.nested')) { foreach ($this->items as &$item) { $this->ordering[$item->a_parent_id][] = $item->a_id; } } // if is frontend, show toolbar if ($app->isAdmin()) { parent::display($tpl); } else { parent::displayWithPanel($tpl, $path); } }