/** * Displays a submenu if there is one and if hidemainmenu is not set * * @param $selected * @return unknown_type */ public function displaySubmenu($selected = '') { if (!JRequest::getInt('hidemainmenu') && empty($this->hidemenu)) { jimport('joomla.html.toolbar'); require_once JPATH_ADMINISTRATOR . '/includes/toolbar.php'; $view = strtolower(JRequest::getVar('view')); $menu = DSCMenu::getInstance(); } }
/** * 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>"; }