dev-master
9999999-devAn easy to use table based menu plugin for CakePHP3
MIT
The Requires
- php >=5.4.16
- cakephp/cakephp ~3.0
The Development Requires
An easy to use table based menu plugin for CakePHP3
This plugin is still in a development phase., (*2)
If you wish to contribute please let me know., (*3)
The plugin should now work pretty well., (*4)
The requirements are not included in composer as you should include them directly with composer or a CDN., (*5)
composer require elboletaire/twbs-cake-plugin:~3.0 composer require twbs/bootstrap:~3.0 composer require components/jquery:1.* #[OR] composer require components/jquery:2.* #jQuery 2.x (IE <9 not supported)
$this->Html->css('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'); $this->Html->css('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css'); $this->Html->script('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'); $this->Html->script('http://code.jquery.com/jquery-1.11.3.min.js'); //[OR] $this->Html->script('http://code.jquery.com/jquery-2.1.4.min.js'); //jQuery 2.x (IE <9 not supported)
You can install this plugin into your CakePHP application using composer., (*6)
The recommended way to install composer packages is:, (*7)
composer require 'markhatchell/cakephp3-easy-menus:dev-master'
Add this to config/bootstrap.php to activate the plugin:, (*8)
Plugin::load('EasyMenus', ['bootstrap' => false, 'routes' => true]);
Install the table for EasyMenus:, (*9)
bin/cake migrations migrate --plugin EasyMenus
To display the menu: Add this to /src/Controller/AppController.php, (*10)
use EasyMenus\Controller\Component\EasyMenusComComponent; ... public function initialize() { parent::initialize(); ... $this->loadComponent('EasyMenus.EasyMenusCom'); }
Add this to src/template/layout/default.ctp:, (*11)
<?=$this->Element('EasyMenus.easymenu')?>
To access the menu admin UI navigate to:, (*12)
/admin/EasyMenus
An easy to use table based menu plugin for CakePHP3
MIT