function render(&$params, $callback) { // Include the new menu class $xml = modNewMainMenuHelper::getXML($params->get('menutype'), $params, $callback); if ($xml) { $class = $params->get('class_sfx'); // add icon class if menu images are enabled if ($params->get('menu_images') && $params->get('menu_images') != -1) { $class .= ' icon'; } $xml->addAttribute('class', 'menu' . ' ' . $class); if ($tagId = $params->get('tag_id')) { $xml->addAttribute('id', $tagId); } $result = JFilterOutput::ampReplace($xml->toString((bool) $params->get('show_whitespace'))); $result = str_replace(array('<ul/>', '<ul />'), '', $result); echo $result; } }