/** * First displays the submenu, then displays the output * but only if a valid _doTask is set in the view object * * @param $tpl * @return unknown_type */ public function display($tpl = null) { // display() will return null if 'doTask' is not set by the controller // This prevents unauthorized access by bypassing the controllers if (empty($this->_doTask)) { return null; } $this->getLayoutVars($tpl); if (!JRequest::getInt('hidemainmenu') && empty($this->hidemenu)) { $this->displaySubmenu(); } $app = DSC::getApp(); $config = $app::getInstance(); if ($config->get('include_site_css', '1')) { JHTML::_('stylesheet', 'site.css', 'media/' . $this->_option . '/css/'); } parent::display($tpl); }
/** * Displays a layout file with room for a left menu bar * @param $tpl * @return unknown_type */ public function displayWithLeftMenu($tpl = null, $menuname) { // TODO This is an ugly, quick hack - fix it echo "<table width='100%'>"; echo "<tr>"; echo "<td style='width: 180px; padding-right: 5px; vertical-align: top;' >"; DSC::load('DSCMenu', 'library.menu'); if ($menu = DSCMenu::getInstance($menuname)) { $menu->display('leftmenu', $menu); } $modules = JModuleHelper::getModules($this->_name . "_left"); $document = JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $attribs = array(); $attribs['style'] = 'xhtml'; foreach ($modules as $mod) { echo $renderer->render($mod, $attribs); } echo "</td>"; echo "<td style='vertical-align: top;' >"; parent::display($tpl); echo "</td>"; echo "</tr>"; echo "</table>"; }