title: Zend Navigation, ACL and Partials
body: <p>I have Zend Navigation object with Acl and Roles:</p>
  
  <pre><code>echo $this-&gt;navigation()-&gt;menu('navigation')
  -&gt;setAcl($this-&gt;acl)
  -&gt;setRole(($this-&gt;user ? 'user' : 'guest'))
  -&gt;render();
  </code></pre>
  
  <p>and its work perfectly (hides some pages)</p>
  
  <p>BUT</p>
  
  <p>when i use custom partial:</p>
  
  <pre><code>echo $this-&gt;navigation()-&gt;menu('navigation')
  -&gt;setAcl($this-&gt;acl)
  -&gt;setRole(($this-&gt;user ? 'user' : 'guest'))
  -&gt;setPartial('partial/twitterBootstrapNavHeadUl.phtml')
  -&gt;render();
  </code></pre>
  
  <p>and this partial content</p>
  
  <pre><code>foreach ($this-&gt;container as $page)
      echo $this-&gt;navigation()-&gt;menu()-&gt;htmlify($page);
  </code></pre>
  
  <p>it pass to the partial $this->container <strong>with ALL pages</strong> (via acl setted as unaviable)</p>
  
  <p>Maybe i should pass acl etc to partial </p>
  
  <pre><code>foreach ($this-&gt;container as $page)
      echo $this-&gt;navigation()-&gt;menu()-&gt;setAcl($this-&gt;acl)-&gt;setRole(($this-&gt;user ? 'user' : 'guest'))-&gt;htmlify($page); // ?????????????????????
  </code></pre>
  
  <p>but how to achieve it?</p>
  
  <p>Is there something what I should do/know?</p>