Mo 11 Mai 2009
Simples horizontales Menü mit ” | ” als Trenner
Posted by flowschi under Typolight
[8,886] Comments
Für ein ganz einfaches horizontales Menü wie unter www.dietges.de ohne Unterscheidung auf active/first/last und mit ” | ” zwischen den Punkten genügt folgendes Template:
<ul class="<?php echo $this->level; ?>">
<?php foreach ($this->items as $item): ?>
<li<?php if ($item['class']): ?> class=”<?php echo $item['class']; ?>”<?php endif; ?>><?php if ($item['class'] != “first”): ?> | <?php endif; ?><a href=”<?php echo $item['href']; ?>” title=”<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>”<?php if ($item['class']): ?> class=”<?php echo $item['class']; ?>”<?php endif; ?><?php if ($item['accesskey'] != ”): ?> accesskey=”<?php echo $item['accesskey']; ?>”<?php endif; ?><?php if ($item['tabindex']): ?> tabindex=”<?php echo $item['tabindex']; ?>”<?php endif; ?><?php if ($item['nofollow']): ?> rel=”nofollow”<?php endif; ?> onclick=”this.blur();<?php echo $item['target']; ?>”><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
<?php endforeach; ?>
</ul>