Yii 1.1: espaceholder

A quick and simple image placeholder extension for Yii.
2 followers

ESpaceHolder

It is a Yii Framework extension, so you'll need a running Yii install to use it. (you'll also need internet access!)

It will (hopefully) make it easier to use http://placehold.it

Space Holder

Installation

Step 1) extract the content under protected/extensions (make sure it's called espaceholder)

Step 2) call it in a view like:

// a default (but useless) 50x50 box
$this->widget( 'ext.espaceholder.ESpaceHolder' );
 
// something more useful
$this->widget( 
  'ext.espaceholder.ESpaceHolder', 
  array( 
    'size' => '250', // you can also do 300x250
    'text' => 'Yii ROCKS!', 
    'htmlOptions' => array( 'title' => 'test image' ) 
  ) 
);

Resources

Be the first person to leave a comment

Please to leave your comment.

Create extension