aboutsummaryrefslogtreecommitdiff
path: root/app/views/sitemap/navigation.php
blob: 7c32ae58032a56bcded896f58f7da56b279d19b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * @var Navigation[] $navigation
 * @var bool $needs_image
 * @var string $style
 */
?>
<ul>
    <? foreach ($navigation as $nav) : ?>
        <? if ($nav->isVisible($needs_image) && $nav->isEnabled()) : ?>
            <li>
                <a href="<?= URLHelper::getLink($nav->getURL()) ?>" style="font-weight: <?= $style ?>;">
                    <?= htmlReady($nav->getTitle()) ?>
                </a>
                <? if (count($nav->getSubNavigation())) : ?>
                    <?= $this->render_partial('sitemap/navigation',
                            ['navigation' => $nav, 'needs_image' => false, 'style' => 'normal']) ?>
                <? endif ?>
            </li>
        <? endif ?>
    <? endforeach ?>
</ul>