Download the PHP package gorriecoe/silverstripe-menu without Composer
On this page you can find all versions of the php package gorriecoe/silverstripe-menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gorriecoe/silverstripe-menu
More information about gorriecoe/silverstripe-menu
Files in gorriecoe/silverstripe-menu
Package silverstripe-menu
Short Description Adds multiple menus that are defined via yml and managed via the cms.
License BSD-3-Clause
Homepage http://github.com/gorriecoe/silverstripe-menu
Informations about the package silverstripe-menu
Silverstripe menus
Adds multiple menus that are defined via yml and managed via the cms.
Installation
Composer is the recommended way of installing SilverStripe modules.
Requirements
- silverstripe/framework ^4.0
- symbiote/silverstripe-gridfieldextensions ^3.1
- gorriecoe/silverstripe link ^1.1
Maintainers
Creating custom menus
As it is common to reference MenuSets by slug in templates, you can configure sets to be created automatically during the /dev/build task. These sets cannot be deleted through the CMS.
Nested and flat menus
By default menus will be flat, which means links can not have child links associated with them. If you need a nested menu structure, you can do so by adding allow_children: true
to the yml file as shown below.
Adding links to menus
Once you have created your menus you can add links in the admin area. The fields are inherited from silverstripe link.
Automatically add links from sitetree to specific menus
If you need to automatically add links to a menu after the creation of a page, you can do so by adding the following extension to page and defining owns_menu
.
Usage in template
See silverstripe link for more template options.
All versions of silverstripe-menu with dependencies
silverstripe/graphql Version ^4.0.0
symbiote/silverstripe-gridfieldextensions Version ^3.1
gorriecoe/silverstripe-link Version ^1.1