sadafs
(Sadaf Cu)
1
hi, i have a pdf file in assets/uploads/documents folder, i want to make a like that will open pointed pdf in new window, my code is as follow :
CHtml::link(CHtml::encode($model->ApplicationDocument ),array(Yii::app()->baseUrl . '/assets/uploads/documents/'.$model->ApplicationDocument))
this produce link :
localhost/mywebsite/index.php?r=mywebsite/assets/uploads/documents/1301145326d2ovc.pdf
instead of :
localhost/mywebsite/assets/uploads/documents/1301145326d2ovc.pdf
what i m missing 
waiting for reply…
phtamas
(Phtamas)
2
Second parameter should be a string instead of an array:
[size="3"][color="#660066"][size="2"][size="3"][color="#000000"][size="3"]
CHtml::link(CHtml::encode($model->ApplicationDocument), Yii::app()->baseUrl . 'assets/uploads/documents/' . $model->ApplicationDocument)
[/size][/color][/size][/size][/color][/size]
astyagi2
(Ashishtyagi10)
5
What should I need to do if I want to open that pdf in a new tab ??
CHtml::link(CHtml::encode($model->ApplicationDocument), Yii::app()->baseUrl . 'assets/uploads/documents/' . $model->ApplicationDocument,array('target'=>'_blank')