function navi()
{
    echo "<ul>";
    // start HTML-List
    $max_depth = 3;
    // max nesting-depth root is depth=0
    $inc_art = true;
    // include articles
    $inc_root_art = false;
    // include root articles
    $inc_start_art = false;
    // include start article
    $config = array($max_depth, $inc_art, $inc_start_art, $inc_root_art);
    // config array
    $items = [];
    // wrapper for subitem sizes
    $count = 0;
    // items per nesting level
    foreach (OOCategory::getRootCategories() as $item) {
        if (!$item->isOnline()) {
            continue;
        }
        $count++;
        // initalize each root-item
        // print root-item
        echo '<li><a href="' . $item->getUrl() . '" title="' . $item->getName() . '">' . $item->getName() . '</a></li>';
        $d = 0;
        // set nesting-depth for root-item
        getSubItems($item, $d, $config);
        $d = 0;
        // REset nesting-depth for root-item
    }
    // get Root Articles
    if (sizeof(OOArticle::getRootArticles()) >= 1 && $config[3]) {
        foreach (OOArticle::getRootArticles() as $art) {
            if (!$art->isOnline()) {
                continue;
            }
            echo '<li><a href="' . $art->getUrl() . '" title="' . $art->getName() . '">' . $art->getName() . '</a></li>';
        }
    }
    echo "</ul>";
}
Exemple #2
0
echo rex_linkmap_tree($tree, $category_id, $roots, $GlobalParams);
?>
            </div>
        </div>

        <div class="rex-area-col-b">
            <h3 class="rex-hl2"><?php 
echo $I18N->msg('lmap_articles');
?>
</h3>
            <div class="rex-area-content">
            <ul>
            <?php 
$articles = null;
if ($isRoot && count($mountpoints) == 0) {
    $articles = OOArticle::getRootArticles();
} elseif ($category) {
    $articles = $category->getArticles();
}
if ($articles) {
    foreach ($articles as $article) {
        $liClass = $article->isStartpage() ? ' class="rex-linkmap-startpage"' : '';
        $url = rex_linkmap_backlink($article->getId(), htmlspecialchars($article->getName()));
        echo rex_linkmap_format_li($article, $category_id, $GlobalParams, $liClass, ' href="' . $url . '"');
        echo '</li>' . "\n";
    }
}
?>
            </ul>
            </div>
        </div>
 function get()
 {
     $s = '';
     $s_self = '';
     $this->_depth = 0;
     if ($this->root_category === null) {
         $root_nodes = OOCategory::getRootCategories($this->ignore_offlines, $this->clang);
     } else {
         if (is_int($this->root_category) && $this->root_category === 0) {
             $root_nodes = OOArticle::getRootArticles($this->ignore_offlines, $this->clang);
         } else {
             $root_nodes = array();
             $root_category = OOCategory::_getCategoryObject($this->root_category);
             // Rootkategorien selbst nicht anzeigen, nur deren Kind-Elemente
             if (is_array($root_category)) {
                 foreach ($root_category as $root_cat) {
                     $this->_appendChilds($root_cat, $root_nodes);
                     $this->_appendArticles($root_cat, $root_nodes);
                 }
             } else {
                 $this->_appendChilds($root_category, $root_nodes);
                 $this->_appendArticles($root_category, $root_nodes);
             }
         }
     }
     if (is_array($root_nodes)) {
         foreach ($root_nodes as $node) {
             $s_self .= $this->_formatNode($node);
         }
         // Parent Tag nur erstellen, wenn auch Childs vorhanden sind
         if ($s_self != '') {
             $s .= '<' . $this->main_tag . $this->main_attr . '>';
             $s .= $s_self;
             $s .= '</' . $this->main_tag . '>';
         }
     }
     return $s;
 }