define('modZaragozaDDMenuXMLCallbackDefined', true); } global $mainframe; $document =& JFactory::getDocument(); if ($incluircss) { $document->addCustomTag('<link rel="stylesheet" href="' . JURI::base() . 'modules/mod_zaragozaddmenu/css/' . $incluircss . '.css" type="text/css" />'); } $document->addScript(JURI::base() . 'modules/mod_zaragozaddmenu/js/UvumiDropdown-compressed.js'); $document->addCustomTag(' <script type="text/javascript"> <!-- var myMenu = new UvumiDropdown("dropdown-zaragoza",{ duration:' . $duration . ', transition:' . $transition . ', openDelay :' . $openDelay . ', closeDelay:' . $closeDelay . ', clickToOpen:' . $clickToOpen . ' }); --> </script> '); echo ' <div class="zddmenu"> <div>'; modZaragozaDDMenuHelper::render($params, 'modZaragozaDDMenuXMLCallback'); echo ' </div> <div style="clear:both"></div> </div>';
function render(&$params, $callback) { switch ($params->get('menu_style', 'list')) { case 'list_flat': // Include the legacy library file require_once dirname(__FILE__) . DS . 'legacy.php'; mosShowHFMenu($params, 1); break; case 'horiz_flat': // Include the legacy library file require_once dirname(__FILE__) . DS . 'legacy.php'; mosShowHFMenu($params, 0); break; case 'vert_indent': // Include the legacy library file require_once dirname(__FILE__) . DS . 'legacy.php'; mosShowVIMenu($params); break; default: // Include the new menu class $xml = modZaragozaDDMenuHelper::getXML($params->get('menutype'), $params, $callback); if ($xml) { $class = $params->get('class_sfx'); $xml->addAttribute('class', 'dropdown'); $xml->addAttribute('id', 'dropdown-zaragoza'); $result = JFilterOutput::ampReplace($xml->toString((bool) $params->get('show_whitespace'))); $result = str_replace(array('<ul/>', '<ul />'), '', $result); echo $result; } break; } }