title: Symfony 2 Nav. Menu, open in new window
body: <p>I'm attempting to create a new window when a user clicks a link in the navigation menu. What I'm attempting to do at present is just add a target="_blank" item to the url, thereby creating an entirely new page, and from there I'm planning to learn how to change this for my various other needs. The problem is, I'm unable to get the target to go to the associated link.</p>
  
  <p>I've attempted:</p>
  
  <pre><code>$dropdown-&gt;addChild('Text', array('route' =&gt; 
       'routeName', 'routeParameters' =&gt; array('parmName' =&gt; 'parameter'), 
       'attr' =&gt; array('target' =&gt; '_blank'));
  </code></pre>
  
  <p>But the above results in it not adding the _blank to anything.</p>
  
  <pre><code>$dropdown-&gt;addChild('Text', array('route' =&gt; 'routeName',
       'routeParameters' =&gt; array('paramName' =&gt; 'parameter')))
               -&gt;setAttribute('target', '_blank');
  </code></pre>
  
  <p>Results in the target being set to the li, not to the link itself, as seen below.</p>
  
  <pre><code>&lt;li target="_blank" class="first"&gt;        &lt;a href="routeLink"&gt;Text&lt;/a&gt;
  </code></pre>
  
  <p>Is there a means to directly set the attribute to the link, so that it will open in a new window when clicked?</p>
  
  <p>Any time and help you can provide is much appreciated.</p>