Skip to content

cameri/CakePHP-Placeholder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CakePHP-Placeholder

CakePHP-Placeholder is a CakePHP Plugin for generating placeholder images using Brian Kiewel's library (https://github.com/img-src/placeholder).

Installation

If your Cake application is already in a Git repository, clone CakePHP-Placeholder using git submodule.

cd app/
git submodule add -b master https://github.com/Cameri/CakePHP-Placeholder.git Plugin/Placeholder

Otherwise clone the repo or download a tarball and install it into app/Plugin/Placeholder or in any of your pluginPaths.

Then activate the plugin in your app/Config/bootstrap.php file as shown below:

CakePlugin::load('Placeholder', array('bootstrap' => true, 'routes' => true));

Or

CakePlugin::loadAll(array(
	'PlaceHolder' => array('bootstrap' => true, 'routes' => true)
));

Or

CakePlugin::load('Placeholder'); // Load plugin
CakePlugin::bootstrap('Placeholder'); // Load boostrap
CakePlugin::routes('Placeholder'); // Load routes

Configuration

Open app/Plugin/Placeholder/Config/bootstrap.php and change the default settings.

Add, modify or remove routes from app/Plugin/Placeholder/Config/routes.php.

By default, the plugin will route the following:

Usage

There's two ways to render placeholders using this plugin:

Upcoming features

  • PlaceholderHelper to use in templates: Placeholder->display(50,30); ?>

Issues

If you find an issue in the code or want to suggest something, please use the tickets at http://github.com/Cameri/CakePHP-Placeholder/issues

License

CakePHP-Placeholder is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages