예제 #1
0
파일: base.php 프로젝트: ratbird/hope
<?php

# Lifter010: TODO
$navigation = PageLayout::getTabNavigation();
$tab_root_path = PageLayout::getTabNavigationPath();
if ($navigation) {
    $subnavigation = $navigation->activeSubNavigation();
    if ($subnavigation !== null) {
        $nav_links = new NavigationWidget();
        $nav_links->id = 'sidebar-navigation';
        foreach ($subnavigation as $path => $nav) {
            if (!$nav->isVisible()) {
                continue;
            }
            $nav_id = "nav_" . implode("_", preg_split("/\\//", $tab_root_path, -1, PREG_SPLIT_NO_EMPTY)) . "_" . $path;
            $link = $nav_links->addLink($nav->getTitle(), URLHelper::getLink($nav->getURL()), null, array('id' => $nav_id));
            $link->setActive($nav->isActive());
            if (!$nav->isEnabled()) {
                $link['disabled'] = true;
                $link->addClass('quiet');
            }
        }
        if ($nav_links->hasElements()) {
            Sidebar::get()->insertWidget($nav_links, ':first');
        }
    }
}
// TODO: Remove this after sidebar migration has been completed
if ($infobox && is_array($infobox)) {
    $sidebar = Sidebar::get();
    if (!$sidebar->getImage()) {