Hi,
My question is simple, how do i create a full url, which my users can copy and use as trackback?
Right now, i can only make relative URL’s, but thats not very reusable, if the domain is hardcoded.
Thanks
Hi,
My question is simple, how do i create a full url, which my users can copy and use as trackback?
Right now, i can only make relative URL’s, but thats not very reusable, if the domain is hardcoded.
Thanks
I think this is what you’re looking for:
Yii:app()->createAbsoluteUrl(route, …)
http://www.yiiframework.com/doc/api/CController#createAbsoluteUrl-detail
/Tommy
Hehe, thanks.
Can it be used with CHtml::link ?
It seems so to me, the handling of the url param is described here:
http://www.yiiframework.com/doc/api/CHtml#normalizeUrl-detail
Edit: confirmed
/Tommy
Okay…
Right now i use:
CHtml::link(‘Text’,Yii::app()->controller->createAbsoluteUrl(‘controller/action’))
But that’s pretty nasty