Files
gallery3/modules/gallery/views/menu.html.php
Bharat Mediratta 13faf6035d Remove Menu::compact() in favor of putting an if-then clause in
menu.html.php.  This serves two purposes:

1) It's more efficient since we're doing less passes over the Menu tree
2) We're allowing themers to decide whether or not to show empty menus
2009-10-27 14:00:32 -07:00

26 lines
568 B
PHP

<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if ($menu->elements): // Don't show the menu if it has no choices ?>
<? if ($menu->is_root): ?>
<ul class="<?= $menu->css_class ?>">
<? foreach ($menu->elements as $element): ?>
<?= $element->render() ?>
<? endforeach ?>
</ul>
<? else: ?>
<li title="<?= $menu->label->for_html_attr() ?>">
<a href="#">
<?= $menu->label->for_html() ?>
</a>
<ul>
<? foreach ($menu->elements as $element): ?>
<?= $element->render() ?>
<? endforeach ?>
</ul>
</li>
<? endif ?>
<? endif ?>