TextBlocks plugin for CakePHP
This package is auto-updated.
Last update: 2023-11-06 20:14:52 UTC
Note: This is a non-stable plugin for CakePHP 3.x at this time. It is currently under development and should be considered experimental.
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require cakemanager/cakephp-textblocks
Now load the plugin with the command:
$ bin/cake plugin load -r -b TextBlocks
Run the database migrations with:
$ bin/cake migrations migrate --plugin TextBlocks
Register new blocks with:
You can get 2 types of contents: Title and Body. Get your title this way...
And get your body this way:
Variables can be passed on both of the getters:
// Imagine that the body of 'my_block' is: "Good morning, :name" Blox::body('my_block', [ 'name' => 'Leonardo' ]); // Output will be: "Good morning, Leonardo"
The Blocks can be managed by the CakeAdmin plugin, or you can create CRUD yourself.