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.
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
Edit your main layout file (usually /protected/views/layout/main.php)
<?php $this->beginWidget('application.extensions.BaseUrlAppender') ?>
<html>
....
....
</html>
<?php $this->endWidget() ?>
now all refernces like ~~~ [html] ~~~ and others will be rewritten to ~~~ [html] ~~~
List of all rewritten tags: ~~~ [html] <A|LINK>:HREF <IMG|SCRIPT|INPUT>:SRC
:ACTION background background:url ~~~Change Log ¶
February 26, 2009 ¶
- Initial release.
February 27, 2009 ¶
- version 1.1
- Rewritten as CWidget, documentation changed
2 HTML alternative
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.
HTML alternative
Wherewith is bad to use '' meta tag?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.