Wenn das Newsarchivmenü verwendet wird, kann es dazu kommen, dass die Geschichte ziemlich lang wird - das ist unter Umständen auch auf Handys ne ewige scrolling-Sache.
Wir zeigen hier nur die Monate des aktuellen Jahres an:
Code:
<!-- indexer::stop -->
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<ul class="level_1">
<?php foreach ($this->items as $year=>$months): ?>
<li class="year submenu">
<?php if ($year == $this->activeYear): ?>
<span class="active"><?php echo $year; ?></span>
<?php else: ?>
<a href="<?php echo $this->url; ?>year=<?php echo $year; ?>"><?php echo $year; ?></a>
<?php endif; ?>
<?php if ($year == date (Y)): ?>
<ul class="level_2">
<?php foreach ($months as $month): ?>
<?php if($month['isActive']): ?>
<li class="active<?php if ($month['class']): ?> <?php echo $month['class']; endif; ?>"><span class="active"><?php echo $month['link']; ?><?php if ($this->showQuantity): ?> (<?php echo $month['quantity']; ?>)<?php endif; ?></span></li>
<?php else: ?>
<li<?php if ($month['class']): ?> class="<?php echo $month['class']; ?>"<?php endif; ?>><a href="<?php echo $this->url; ?>month=<?php echo $month['date']; ?>" title="<?php echo $month['title']; ?>"><?php echo $month['link']; ?><?php if ($this->showQuantity): ?> (<?php echo $month['quantity']; ?>)<?php endif; ?></a></li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<!-- indexer::continue -->
Lesezeichen