Download the PHP package radotch/cakephp-menu-manager without Composer
On this page you can find all versions of the php package radotch/cakephp-menu-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download radotch/cakephp-menu-manager
More information about radotch/cakephp-menu-manager
Files in radotch/cakephp-menu-manager
Package cakephp-menu-manager
Short Description MenuManager plugin for CakePHP
License MIT
Informations about the package cakephp-menu-manager
MenuManager plugin for CakePHP
Requirements
For testing:
Features
- Create Menu
- Create Menu Links associated to Menu
- Menu Links have Tree structure. It's make easy to create dropdowns, accordeon or other specific kind of Menu.
- Menu Links positions
- Translations
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install plugin is:
Load plugin
To load plugin add next line in bootstrap() method in Application.php file:
or you can use object way
Prior 3.6.0 use next:
And you are ready to use MenuManager plugin.
Migrations
Once the plug-in is available execute Migrations to create required tables:
Note: If table i18n already exists migration will not try to create it.
There is available initial seed which can be used if cover application needs on start or just for test purposes:
Usage
Control panel
Plugin's Control panel is available on '/admin/menu-manager/'. Do not forget to restrict access
Now you can create Menus and add Menu Links.
Get Data
To get Menu Links in hierarchical structure use 'threaded' finder:
Or
Menu Links positions
When create or update menu Link you can set link's position. If is changed at this point the change will not affect other links. All other Menu Link positions must be changed by hand.
Sorry about that and later when I have little more time I'll automate it. Also support will be accepted and appreciated.
Translation
To be able to add translations about Menu and Menu Links set next Configuration as associative array or list:
or
The best place is bootstrap() method at Application.php I think.
Display Menu
At this stage to display menu you have to write your own code.
Good luck!