baseurlappender ViewRenderer which will append baseurl to urls and links in the rendered view

  1. Documentation
  2. Change Log

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] image.png ~~~ and others will be rewritten to ~~~ [html] image.png ~~~

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
1 1
2 followers
834 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags:
Developed by: oleksiy
Created on: Feb 26, 2009
Last updated: 15 years ago

Downloads

show all