Yii Framework Forum: Open new window using CHtml::link inside GridView - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Open new window using CHtml::link inside GridView Rate Topic: *---- 1 Votes

#1 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 17-June 11

Posted 06 October 2011 - 03:27 PM

further to the same topic:

both of the following code inside GridView are not working

code 1:
        array(
            'name'  => 'url',
            'value' => 'CHtml::link($data->desc, $data->url, array(target=>_blank))',
            'type'  => 'html',
        ),            


code 2:
        array(
            'name'  => 'url',
            'value' => 'CHtml::link($data->desc, $data->url, array(target=>_blank))',
            'type'  => 'url',
        ),            

I enjoy the Yii.sy coding life here.
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 06 October 2011 - 05:44 PM

Use 'type'=>'raw'

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
2

#3 User is offline   rootbear 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 222
  • Joined: 17-June 11

Posted 07 October 2011 - 11:48 AM

View Posttri, on 06 October 2011 - 05:44 PM, said:

Use 'type'=>'raw'

/Tommy


Thanks, Tommy!
Yii is beautiful.
I enjoy the Yii.sy coding life here.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users