Yii Framework Forum: Url In Clinkcolumn - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Url In Clinkcolumn external link Rate Topic: -----

#1 User is offline   flowerlee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 08-February 13

Posted 08 February 2013 - 05:22 AM

Hi,
I have a problem using external link in CLinkColumn

'columns'=>array(
		array(
				 'class'=>'CLinkColumn',
                                 'labelExpression'=>'CHtml::encode($data["ID"])',
				 'urlExpression' => 'array("www.xy.com", "document"=>$data["ID"])',
				 'linkHtmlOptions'=>array('target'=>'_top'),											  					
				 'header'=>'ID',	
				),

...

gives me source code
<a target="_top" href="/path_to_project/backend.php?r=controller_name/www.xy.com&amp;document=2">2</a>


and after following the link I have url
localhost/path_to_project/backend.php?r=controller_name/www.xy.com&document=2


can you please help me to configure CLinkColumn to open as www.xy.com&document=2?

Thanks in advance!
0

#2 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,332
  • Joined: 21-February 11
  • Location:Greece

Posted 08 February 2013 - 06:44 AM

Hi my friend


check that
urlExpression' => 'array("http://www.xy.com", "document"=>$data["ID"])',

Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#3 User is offline   flowerlee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 08-February 13

Posted 08 February 2013 - 11:32 AM

Hi, thank you for your answer. I've tried it but the result is the same... :(
0

#4 User is offline   seenivasan 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 620
  • Joined: 17-June 12
  • Location:Chennai,TamilNadu,India.

Posted 08 February 2013 - 01:43 PM

Dear Friend

Kindly check this.

'urlExpression' => '"http://www.xy.com&document=".$data["ID"]',

0

#5 User is offline   flowerlee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 08-February 13

Posted 08 February 2013 - 04:30 PM

It works! :) Thank you so much
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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