Allows complex menu management to be handled through the CMS when a simple tree structure is not enough.
The menu management module is for creating custom menu structures when the site tree hierarchy just won't do.
The latest version only supports SilverStripe 3, see the 1.0 branch for a SilverStripe 2.4 compatible version.
Menu Manager is licensed under an MIT license
To install drop the silverstripe-menumanager directory into your SilverStripe root. You must also install silverstripe-gridfieldextensions as it is a dependency for this module.
Once both of these are installed, you can run
Installing from composer is easy,
Create or edit a
composer.json file in the root of your SilverStripe project, and make sure the following is present.
After completing this step, navigate in Terminal or similar to the SilverStripe root directory and run
composer install or
composer update depending on whether or not you have composer already in use.
There are 2 main steps to creating a menu using menu management.
This is pretty straight forward. You just give the MenuSet a Name (which is what you reference in the templates when controlling the menu).
As it is common to reference MenuSets by name in templates, you can configure sets to be created automatically during the /dev/build task. These sets cannot be deleted through the CMS.
Once you have saved your MenuSet you can add MenuItems.
MenuItems have 4 important fields:
A page to associate your MenuItem with.
This field can be left blank if you link the menu item with a page. If not fill with the title you want to display in the template.
This field can be left blank unless you want to link to an external website. When left blank using $Link in templates will automatically pull the link from the MenuItems associated Page. If you enter a link in this field and then pick a Page as well the link will be overwritten by the Page you chose.
Can be used as a check to see if 'target="_blank"' should be added to links.
<% loop $MenuSet('YourMenuName').MenuItems %> <a href="$Link" class="$LinkingMode">$MenuTitle</a> <% end_loop %>
This project follows the standards defined in: