<?php
class HomeWebApp_View_Helper_ArticleCategories extends Zend_View_Helper_Abstract
{
    public function articleCategories($categories)
    {
        $xhtml = "";
        $catCount = 0;
        foreach($categories as $category) {
            if ($catCount++>0) $xhtml.=" ";
            $xhtml .= "<a href=\""
                . $this->view->url(array("name" => $category->getTitleUrl()),"blogCategory")
                . "\">"
                . $category->getName()
                . "</a>";
        }
        
        return $xhtml;
    }
}
