view = 'html'; Xmap::Xmap($config, $sitemap); $this->_parent_children=array(); $this->_last_child=array(); } /** * Print one node of the sitemap */ function printNode( &$node ) { $Itemid = JRequest::getInt('Itemid'); $out = ''; if ($this->sitemap->isExcluded($node->id,$node->uid) && !$this->_isAdmin) { return FALSE; } // To avoid duplicate children in the same parent if ( !empty($this->_parent_children[$this->level][$node->uid]) ) { return FALSE; } //var_dump($this->_parent_children[$this->level]); $this->_parent_children[$this->level][$node->uid] = true; $out .= $this->_closeItem; $out .= $this->_openList; $this->_openList = ""; if ( $Itemid == $node->id ) $out .= '
';
$class= 'xmapexclon';
} else {
$img = '
';
$class= 'xmapexcloff';
}
echo ' '.$img.'';
# echo '
';
}
//echo $this->_last_child[$this->level-1] . ' ' . $this->_parent_children[$this->level]['parent'];
$this->count++;
$this->_last_child[$this->level] = $node->uid;
return TRUE;
}
/**
* Moves sitemap level up or down
*/
function changeLevel( $level ) {
if ( $level > 0 ) {
# We do not print start ul here to avoid empty list, it's printed at the first child
$this->level += $level;
$this->_childs[$this->level]=0;
$this->_openList = "\n