Picture of Rob Mausser
Adapt Menu Controller Help
by Rob Mausser - Friday, 27 January 2017, 9:26 PM
 

Hi, I've installed the Adapt Menu Controller:

 

https://github.com/cgkineo/adapt-menu-controller

 

In the Read-Me it says:

 

To register a menu:


    Adapt.registerMenu("box", BoxMenuView);

    Adapt.on('router:menu', function(model) {

        //$('#wrapper').append(new BoxMenuView({model:model}).$el); < do not allow menu to render itself

    });

 

But I don't know where this is supposed to go? It doesn't say where you put this code!

 

 

Picture of Matt Leathes
Re: Adapt Menu Controller Help
by Matt Leathes - Saturday, 28 January 2017, 12:29 AM
 

Hi Rob

Looks to me like that would need to go in the code for each of the menus you want to be able to use with the menu-controller.

The sample code shown is for boxmenu and would go here.

The first part of the code registers the menu with the menu-controller, the second part shows how you might stop the menu from rendering itself (so that the menu-controller can do it instead).

Picture of Rob Mausser
Re: Adapt Menu Controller Help
by Rob Mausser - Monday, 30 January 2017, 2:58 PM
 

Thanks! Open source: awesome code, terrible directions :) (the git, not your directions)

Picture of Rob Mausser
Re: Adapt Menu Controller Help
by Rob Mausser - Monday, 30 January 2017, 4:52 PM
 

This worked, thank you