title: Yii: CGridView - open a link in new window
body: <p>I have big problems in generating a button in CGridView that opens a page in a new browser window. This is the code, I use: </p>
  
  <pre><code>'preview' =&gt; array(
    'value' =&gt; 'CHtml::link("test", array("classified/preview", "id"=&gt;$data-&gt;id), array("target"=&gt;"_blank"))',
    'header' =&gt; 'Name',
    'name' =&gt; 'name',
    'type' =&gt; 'raw',
  ),
  </code></pre>
  
  <p>The generated link looks like this: </p>
  
  <pre><code>http://localhost/fotomarkt/index.php?r=classified/listmine#
  </code></pre>
  
  <p>So the link is wrong and the "target=_blank" is ignored. </p>
  
  <p>I also saw <a href="https://stackoverflow.com/questions/15737536/yii-cgridview-hyperlink-open-in-new-tab">this</a> with bool.dev's good answer, but somehow, it doesn't work for me... </p>
  
  <p>I guess, it's something stupid, which I simply don't see... </p>