title: Rendering Active Branch of Zend Navigation Without Top Level
body: <p>I am rendering the top-level elements of a Zend Navigation object in one place like this:</p>
  
  <pre><code>echo $this-&gt;navigation()-&gt;menu()-&gt;setMaxDepth(0);
  </code></pre>
  
  <p>How do I render the navigation tree from the second level on down for the active branch?  I've tried creating a partial that loops the <code>$this-&gt;container</code> object, but I don't know how to determine if my current item is the active branch.  Once I've determined that it's the active branch how do I render the menu?  Am I doing this the hard way and missing something obvious?</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I accepted a solution because that's what I used, but I also would like to provide the answer to my actual question, for reference sake. (<code>$this</code> is the view object)</p>
  
  <pre><code>// Find the active branch, at a depth of one
  $branch = $this-&gt;navigation()-&gt;findActive($this-&gt;nav, 1, 1);
  if (0 == count($branch)) {
      // no active branch, find the default branch
      $pages = $this-&gt;nav-&gt;findById('default-branch')-&gt;getPages();
  } else {
      $pages = $branch['page']-&gt;getPages();
  }
  $this-&gt;subNav = new Zend_Navigation($pages);
  </code></pre>
  
  <p><code>$this-&gt;subNav</code> can then be used to render the sub-menu.</p>