mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-20 08:29:54 -04:00
can override them and define their own menu formats. I worry a little bit that this approach may be too heavy since we're now doing a lot more template includes than we were before. Also, I had to change the Menu API to stop using __toString() because you can't throw exceptions from __toString() which would make it an unhappy experience for developers.
24 lines
484 B
PHP
24 lines
484 B
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<? if ($menu->is_root): ?>
|
|
|
|
<ul class="<?= $menu->css_class ?>">
|
|
<? foreach ($this->elements as $element): ?>
|
|
<?= $element->render() ?>
|
|
<? endforeach ?>
|
|
</ul>
|
|
|
|
<? else: ?>
|
|
|
|
<li title="<?= $menu->label->for_html_attr() ?>">
|
|
<a href="#">
|
|
<?= $menu->label->for_html() ?>
|
|
</a>
|
|
<ul>
|
|
<? foreach ($this->elements as $element): ?>
|
|
<?= $element->render() ?>
|
|
<? endforeach ?>
|
|
</ul>
|
|
</li>
|
|
|
|
<? endif ?>
|