#17

Product support

Get help in the plugin support forum.

Categories

  • Utility

This plugin creates a new backend section for Menu Management. This allows for separation of menu management from other site tasks.

Within the admin area, you can add items to a menu. These items link to particular files in your site. The most popular use of this would be to create menus for your site. The ordering of menus is controlled via a drag and drop feature.

Features

  • Ability to select parent node when adding a component to a page to control menu display
  • Drag and drop re-ordering of menus
  • Active states automatically set based on the current page. This can be over-ridden to be any menu
  • Controllable depth of output, between 1-3 levels

Icon by VisualPharm

Showing all 3 levels, including active states

Available Options

  • Alias - This is available to all components and is baked into OctoberCMS
  • Parent Node - The node to get the children of to create the menu. See the Parent Node section below for further information
  • Active Node - This is the active page. The default option is the current page, but you can manually set which menu item should be active.
  • Primary Classes - The classes to add to the parent ul tag. Defaults to "nav nav-pill"
  • Secondary Classes - The classes to add to the children ul tag. Defaults to "dropdown-menu"
  • Tertiary Classes - The classes to add to the grandchildren ul tag. Defaults to ""
  • Depth - How many levels of menu to display. The bootstrap default is 2, so if you do wish to show 3 levels please bear in mind you will need to add your own css to the theme to handle active states.

Adding the component to a Page

When editing a page/partial/layout, add the component to the page as you would any other component

{% component "menu" %}

Inside the widget, you can set the menu class for both the primary and secondary navigation. You also set the parent node at this time.

Behind the scenes

Menu Manager takes advantage of Nested Sets to allow quick traversal and drag and drop functionality. It also makes working out the active page and active parents super simple.

By default no items are created. If you are developing, simply add the seed file back into the update file and run a php artisan plugin:refresh on the server to have some date pre-inserted.

The Parent Node

This is the node from which the menu will be populated. The component will collect all the children of this node and create the menu content from these children nodes. For example, consider this default structure based loosely off the October CMS demo pages.

- Main Menu
-- Home
--- Plugin Components
--- Ajax Framework

If we select "Main Menu" as the Parent Node, we will have 1 menu item visible. This will the title of "Home" and will be a bootstrap style dropdown navigation. Clicking on home will reveal 2 sub-menu items, "Plugin Components" and "Ajax Framework".

If we select "Home" as the Parent Node, we will have 2 menu items visible, "Plugin Components" and "Ajax Framework".

This allows the creation of side navigation relevant to the page you are currently on by re-using the same backend menu but having separate components on the page use different Parent Nodes to change the output.

Other

If you have any suggestions, please raise an issue on the plugin's github repository.

Thanks / Contributions

  • Found the plugin useful on 11 Jul, 2016

    The plugin crashed the new october. Plz change in the controller yaml files: @/plugins/benfeke... to $/benfeke...

    ;) thanks

  • Found the plugin useful on 21 May, 2016

    works great !

  • Found the plugin useful on 15 Feb, 2016

    Very nice plugin. Super simple and just works.

  • Found the plugin useful on 15 Jul, 2015

    Good all around plugin but needs to be altered so separate parameters will show as separate menu items, else why have the parameters option?

  • Found the plugin useful on 28 Apr, 2015

    It looks like if you click on the "Public repository" link you will see a more updated version on GitHub. Looks like updates have been issued up to about a month ago, mainly thanks to Matiss Janis Aboltins.

    In either case, this is an excellent and obviously needed plugin for October.

  • Found the plugin not useful on 4 Mar, 2015

    Even though this plugin has over 600 installations - it broken and no longer maintained. It has 3 valid pull requests, but none of them have any reply (or accept/deny) from the author. Last change done to this plugin was in October of 2014.

  • Found the plugin useful on 23 Feb, 2015

    Is there a way to use the 'parameters' in item's classes?

  • Found the plugin useful on 28 May, 2014

    how to activate this plugin?? there is only one component which is todo , how to create this plugin ,

  • Found the plugin useful on 27 May, 2014

    Thanks for adding the "active" class to the plugin. Slight issue, if you have a link to home page or / the link doesn't get the active class.

  • Found the plugin useful on 27 May, 2014

    Great menu plugin :) The only thing I would add would be a current or active class to an item if it's the current page.

  • Found the plugin useful on 27 May, 2014

    Thank you! Very comfortable plugin!

1.5.1

Added homepage to plugin information. Thanks @gergo85

May 14, 2017

1.5.0

Fixed bugs preventing postgres and sqlite support

May 01, 2017

1.4.8

Merged PR to fix re-order errors. Thanks @CptMeatball

Dec 22, 2016

1.4.7

Merged PR to fix syntax errors with fresh install of 1.4.6. Thanks @devlifeX

Oct 25, 2016

1.4.6

Merged PRs that fix bug with plugin not working with stable release

Oct 22, 2016

1.4.5

Fixed bug where getBaseFileName method was moved to a different object

Jun 26, 2015

1.4.4

Fixed bug with incorrect labels. Thanks @ribsousa

Jun 26, 2015

1.4.3

Fixed bug where getBaseFileName method was moved to a different object

Jun 10, 2015

1.4.2

Fixed bug with URLs not saving correctly

May 18, 2015

1.4.1

Fixed bug caused by deleting needed method of Menu class. Thanks @MatissJA

Mar 23, 2015

1.4.0

Fix for POST operations. PR by @matissjanis, TR translations (@mahony0) and permission registration (@nnmer)

Mar 20, 2015

1.3.4

Fix for JSON validation not firing

Oct 19, 2014

1.3.3

Fix for JSON comment having single quotes. Thanks @adisos

Oct 08, 2014

1.3.2

Fix for param check that is breaking active node lookup. Thanks @alxy

Sep 28, 2014

1.3.1

JSON validation of parameters added; Correct active menu now being set based on parameters; PR sent by @whsol, thanks!

Sep 07, 2014

1.3.0

Added translation ability thanks to @alxy

Aug 23, 2014

1.2.0

Fixed validation and fields bug; Added list classes

Aug 06, 2014

1.1.3

Fixed bug that prevented multiple components displaying

Jul 21, 2014

1.1.2

Reformatted code for better maintainability and better practises

Jul 10, 2014

1.1.1

Added ability to enable/disable individual menu links; Added ability for url parameters & query string; Fixed issue of "getLinkHref()" pulling through full page url with parameters rather than the ACTUAL page url

Jun 17, 2014

1.1.0

Added ability to link to external sites. Thanks @adisos

Jun 17, 2014

1.0.6

Removed NestedSetModel, thanks @daftspunk

Jun 17, 2014

1.0.5

Moved link creation code into the model in preperation for external links; Brought list item class creation into the model; Fixed typo with default menu class

Jun 14, 2014

1.0.4

Fixed bug where re-ordering stopped working

Jun 13, 2014

1.0.3

Made it possible for menu items to not link anywhere; Put a check in so the active node must be a child of the parentNode

May 28, 2014

1.0.2

Added active state to menu; Added ability to select active menu item; Added controllable depth to component

May 27, 2014

1.0.1

First version of MenuManager

May 24, 2014