diff --git a/application/modules/blog/views/scripts/index/latest.phtml b/application/modules/blog/views/scripts/index/latest.phtml index a7eac5f..10a9c6f 100644 --- a/application/modules/blog/views/scripts/index/latest.phtml +++ b/application/modules/blog/views/scripts/index/latest.phtml @@ -10,21 +10,10 @@ getContent() ?> - getTags()) { - - echo '
'; - - $tagList = ''; - foreach ($post->getTags() as $k => $t) { - $tagList .= ''.$t.', '; - } - - echo substr($tagList,0,-2); - - echo '
'; - } - ?> - + getTags()) : ?> +
+ tagList($post->getTags(), array('controller' => 'archive', 'action' => 'filter'), 'blog') ?> +
+ \ No newline at end of file diff --git a/library/Fiktiv/View/Helper/TagList.php b/library/Fiktiv/View/Helper/TagList.php new file mode 100644 index 0000000..cf85ab3 --- /dev/null +++ b/library/Fiktiv/View/Helper/TagList.php @@ -0,0 +1,13 @@ + $v) { + $url['tag'] = $v; + $list[$k] = '' . $v . ''; + } + return implode(', ', $list); + } +}