<ul class="list-unstyled"> <?php foreach ($archive as $archiv) { ?> <?php $date = new \Ilch\Date($archiv->getDateCreated()); ?> <li> <a href="<?php echo $this->getUrl(array('module' => 'article', 'controller' => 'archive', 'action' => 'show', 'year' => $date->format("Y", true), 'month' => $date->format("m", true))); ?> "> <?php echo $date->format("F Y", true); ?> </a> <span class="badge pull-right" style="margin-top: 7px;"><?php echo $articleMapper->getCountArticlesByMonthYear($archiv->getDateCreated()); ?> </span> </li> <?php } ?> </ul> <?php } else { ?> <?php echo $this->getTrans('noArticles'); }