<?php $types = Jobs_Model_Jobs_Table::$_types;

$N = $this->navigation()->getContainer()->findOneByHref('/fr/jobs');

?>
<div class="sidelinks">
    <h2>Offres d'emplois</h2>
    <ul class="job-main-menu">
        <?php
        foreach($types as $key => $value ){
            $active = ($key == $this->params['type'] ) ? 'class="active" ' : ''; 
            echo '<li '.$active.'>';
                $url= $this->url(array('type' => $key ) , 'jobs-list',true );
            echo    '<a class="job-menu-item"  href="'.$url.'">'.$this->translate($value).'</a>';
            echo '</li>';

            $page =  new Zend_Navigation_Page_Mvc(array(
                'label'   => $this->translate($value),
                'route'     => 'jobs-list',

                'params' =>array('type' => $key )
                
            ));

            $N->addPage( $page );
        }
        ?>
         
        <li><a href="<?= $this->url(array(),'jobs',true) ?>">Candidature spontanée</a>  </li>
        
    </ul>
    
</div>