name() == 'li' && $node->level() == 1) { if ($ul = $node->getElementByPath('ul')) $node->removeChild($ul); } if ($node->name() == 'li') { $liChildren = & $node->_children; if (count($liChildren) > 0) { $liFirstChild = & $liChildren[0]; $linkChildren = & $liFirstChild->_children; $span = & $linkChildren[0]; $text = $span->data(); if ($liFirstChild->name() == 'span' && $liFirstChild->attributes('class') == 'separator') { $liFirstChild->_name = 'a'; $liFirstChild->addAttribute('href', '#'); $liFirstChild->addAttribute('onclick', 'return false;'); } if ($liFirstChild->name() == 'a') { if ($liFirstChild->level() == 2) { $liFirstChild->removeChild($span); $lspan = & $liFirstChild->addChild('span', array('class' => 'l')); $lspan->setData(' '); $rspan = & $liFirstChild->addChild('span', array('class' => 'r')); $rspan->setData(' '); $tspan = & $liFirstChild->addChild('span', array('class' => 't')); $tspan->setData($text); } else { $liFirstChild->removeAttribute('class'); $liFirstChild->setData($text); $liFirstChild->removeChild($span); } } } } modMainMenuXMLCallback($node, $args); if ($node->name() == 'li') { $class = $node->attributes('class'); if ($class && false !== strpos(' ' . $class, ' active')) { $itemChildren = & $node->_children; $itemChildren[0]->addAttribute('class', 'active'); } } } define('modMainMenuArtXMLCallbackDefined', true); } if (!defined('artxMenuDecorator')) { function artxMenuDecorator($content) { $result = ''; ob_start(); ?>
get('showAllChildren'); $xml = modMainMenuHelper::getXML($params->get('menutype'), $params, 'modMainMenuArtXMLCallback'); if ($xml) { $xml->addAttribute('class', 'art-menu'); if ($tagId = $params->get('tag_id')) { $xml->addAttribute('id', $tagId); } $result = JFilterOutput::ampReplace($xml->toString((bool)$params->get('show_whitespace'))); $result = str_replace(array('