Are you tired of prepending Yii::app()->request->baseUrl to each image SRC attribute, script or CSS file source link?
Just install this simple extension and it will append baseurl for you.
protected/extensionsEdit your main layout file (usually /protected/views/layout/main.php)
$this->beginWidget('application.extensions.BaseUrlAppender') <html> .... .... </html> <?php $this->endWidget()
now all refernces like
<img src='/images/image.png'/>
and others will be rewritten to
<img src='/path/to/application/images/image.png'/>
List of all rewritten tags:
<A|LINK>:HREF <IMG|SCRIPT|INPUT>:SRC <FORM>:ACTION background background:url
Total 2 comments
Because some people would prefer not to depend on some broken search bots which ignore base href, broken browsers which prepend base href where it should not be prepended, etc.
Wherewith is bad to use '' meta tag?
Leave a comment
Please login to leave your comment.