
<a href="<?=$this->url(array('controller' => 'archive'), 'blog', true) ?>">« <?=$this->translate('u:back') ?></a>

<h1><?=$this->translate('u:filter archive by') . ' ' . $this->translate($this->filterType) ?> - <?=$this->filterValue ?></h1>


<?php
    $hl = new Fiktiv_Highlighter();
    $hl->setHighlighter('geshi');
?>

<?php foreach($this->posts as $post) : ?>
<div class="blogpost">
    <h3><a href="<?=$this->url(array('action' => 'read','id' => $post->permlink),'blog-default') ?>"><?=$post->title ?></a></h3>
    <p class="publish"><?=$post->getPubDate()->toString('yyyy-MM-dd').' '.$this->translate('TIME_AT').' '.$post->getPubDate()->toString('HH:mm').' '.$post->getAuthor()->firstName ?></p>
    <div class="content">
        <?= $hl->replaceCodeblock($post->content) ?>
    </div>

    <?php if ($post->hasTags()): ?>

        <div class="tags">
        <?php
            $count = $post->getTags()->count();
            foreach ($post->getTags() as $tag) {

                echo '<a href="'.$this->url(array('controller' => 'archive', 'action' => 'filter', 'tag' => $tag->name), 'blog', true).'">'.$tag->name.'</a>';

                echo (--$count > 0) ? ', ' : '';
            }
        ?>
        </div>

    <?php endif; ?>

</div>
<?php endforeach; ?>