title: ZF2 - multiple nav menus using the navigation view helper
body: <p>I am trying to use a main navigation in combination with a submenu for more specific navigating.</p>
  
  <p>In my <em>layout</em> I am calling the view helper like this: </p>
  
  <pre><code>$this-&gt;navigation('main_navigation')-&gt;menu()
  </code></pre>
  
  <p>and in my <em>view</em> I am calling it like this:</p>
  
  <pre><code>$this-&gt;navigation('sub_navigation')-&gt;menu()
  </code></pre>
  
  <p>The problem is that whenever I call the <code>navigation()</code> view helper a <strong><em>more than once</em></strong>, it just outputs the <em>second one</em> in both places.  In other words, it's printing the <strong>subnav</strong> for <em>both</em> the main nav <em>and</em> the subnav menus.</p>
  
  <p>My merged config looks like this:</p>
  
  <pre><code>'navigation' =&gt; array(
      'main' =&gt; array(
          'home' =&gt; array(
              'label' =&gt; 'Home',
              'route' =&gt; 'myroute',
          ),
          'somepage' =&gt; array(
              'label' =&gt; 'Me',
              'route' =&gt; 'somepage'
          )
      ),
      'sub' =&gt; array(
          'test' =&gt; array(
              'label'  =&gt; 'Test',
              'route'  =&gt; 'myroute',
              'action' =&gt; 'test'
          ),
          'other-test' =&gt; array(
              'label'  =&gt; 'Other Test',
              'route'  =&gt; 'myroute',
              'action' =&gt; 'other-test'
          )
      )
  )
  </code></pre>
  
  <p>How do I use the <code>navigation</code> view helper so that it will print the correct menu for each call?</p>