CHtml::link() and normalizeUrl should have an option to make url absolute

Many times I have needed to generate absolute URLs in my yii application… Mostly for email, but also when I want to print out an URL.  So as the title says, I think CHtml::link() and CHtml::normalizeUrl should have an optional argument to make the generated url absolute.

If you don't want to add another argument to link(), perhaps you could specify whether it is absolute in htmlOptions?  Or make another method called CHtml::absoluteLink()

thoughts?  Of course I could extend CHtml in my app to do this, but I think it would be a good inside core

I think that is good idea :)

Agree. CController::createUrl could need that option as well. I need that to create Link to send via e-mail.

Try CController::createAbsoluteUrl().

Thanks!