MenuManager

A plugin to enable management of menus within October CMS

Back to MenuManager Support

reynierpm
reynierpm

Hi, I'm working on a site that has its own theme and its own plugins but also I'm using some from community like this one (MenuManager). So I made a layout.htm with this content (my apologies for leaving the code in a external link but I think the code has a few lines so as not to make the post so long I place it beyond). Now if you notice when I add the component it add some code at layout top, this code:

[menu]
start = "id-1"
activeNode = "id-1"
listItemClasses = "item"
primaryClasses = "nav nav-pills"
secondaryClasses = "dropdown-menu"
numberOfLevels = "2"

And also if you take a look you'll see the component itself:

<div class="navbar-collapse collapse">
    {% component 'menu' %}
</div>

But for some reason it's not displayed when I load the page, why? What I'm doing wrong?

benfreke
benfreke

Not sure. I've had a look at the gist and it seems fine.

When I get a chance I'll try and replicate the problem. What version of OctoberCMS is it currently running?

reynierpm
reynierpm

Hi @benfreke nevermind I found where my error was, I was displaying the first menu which have not any children and for that reason the menu wasn't displayed. I fixed few hours ago. Now it's possible to add support for user permissions level? Lets said I want to show a menu only if the user is logged in, is that possible? how?

benfreke
benfreke

I've not played with the user levels, but if you wrap the component tag in a tag to check if the user is logged in that'd do the trick.

Definitely not possible to define it on an individual menu item though.

semsphy
semsphy

I had a problem similar to @reynierpm, I attached menu component to layout. And I got nothing render.

default.htm

description = "Default layout"

[menu header_menu]
start = "id-1"
activeNode = "id-1"
listItemClasses = "scroll"
primaryClasses = "nav navbar-nav"
secondaryClasses = "dropdown-menu"
numberOfLevels = 1
==

nav.htm

<div class="collapse navbar-collapse navbar-right">         
     {% component "header_menu" %}
</div>

I have followed many instruction but it still didn't render.

Regards,

benfreke
benfreke

semsphy said:

I had a problem similar to @reynierpm, I attached menu component to layout. And I got nothing render.

default.htm

description = "Default layout"

[menu header_menu] start = "id-1" activeNode = "id-1" listItemClasses = "scroll" primaryClasses = "nav navbar-nav" secondaryClasses = "dropdown-menu" numberOfLevels = 1

nav.htm

I have followed many instruction but it still didn't render.

Regards,

Hi

Without knowing all the details, each component is separate. If you put the component information at the top of the nav.htm page, does it then work?

I don't believe it is possible for a component to be defined in one view, and then shown in another.

semsphy
semsphy

Thank for your reply. Now I put the component in nav.htm, nav.htm is partial.

[menu header_menu]
start = "id-1"
activeNode = "id-1"
listItemClasses = "scroll"
primaryClasses = "nav navbar-nav"
secondaryClasses = "dropdown-menu"
numberOfLevels = 1
==

It still didn't render.

benfreke
benfreke

The only other thing that comes to mind then is that there is no node with an id of 1. If there is, then you may need to look in to the error logs to see what else is going wrong sorry.

semsphy
semsphy

Would you please check my default.htm?

There is something wrong. Honestly, I don't know where to put node id.

Regards,

benfreke
benfreke

The template looks fine.

I'm at work so I don't have access to a working installation, so I'm going completely off memory here. Which menu item has the ID of 1? You can check the database for that, or I believe when mousing over items in the admin the URL that displays will have the node ID. If you've been changing, or moving, or editing individual items, you may very well not have a menu with the id of 1.

semsphy
semsphy

More information:

"require": {
     "php": ">=5.4",
     "october/rain": "~1.0",
     "october/system": "~1.0",
     "october/backend": "~1.0",
     "october/cms": "~1.0",
     "laravel/framework": "5.0.*",
     "illuminate/html": "5.0.*"
}

Here are the urls:

  1. HOME -> /backend/benfreke/menumanager/menus/update/1
  2. ABOUT -> /backend/benfreke/menumanager/menus/update/2

Regards,

Last updated

benfreke
benfreke

I see your problem. Please review the documentation on how this plugin works.

Basically, the node you select as the start node is the parent. The menu will only display the children of that node. So, create another node and then next home and about underneath that new node. Change the start node to be id-3 and you should be good to go.

semsphy
semsphy

Oh man, you save my life. I am really appreciate. God bless you.

1-13 of 13