createURL with new page


I want to open link in new windows not in the same window.


How can I do it ?


well, not with PHP, you will have to use the onclick= of a button to do a or by rendering that javascript on your view

I am using zii.widgets.grid.CGridView , So I want to use button with link in external window.


This should work:

$url = Yii::app()->createUrl('/item/reposition');

$link = CHtml::link('Click this.', $url, array('target'=>'_blank'));


Thanks , I will try.