<?php

class Fiktiv_View_Helper_RenderSubMenu extends Zend_View_Helper_Abstract
{
    public function renderSubMenu()
    {
        $navigation = $this->view->navigation();
        $container  = $navigation->getContainer();
        $active     = $navigation->menu()->findActive($navigation->getContainer());
        
        if ($active && $active['page']->hasPages()) {
            return $navigation->menu()->setUlClass('subnav')->renderSubMenu();
        }

        return '';
    }
}