MenuManager

A plugin to enable management of menus within October CMS

Back to MenuManager Support

erm3nda
erm3nda

I tried to add: {% component "menu" %} to the main layout.

Result: ("The component 'menu' is not found.").

What i do wrong?

benfreke
benfreke

Have you added the component to the code view?

What I mean by that, is on pages you have the code and markup sections. Components work ( I believe ) because they are initialised in the code section of the template. If you have not initialised the component in your layout then you should get that error.

If that doesn't make sense, let me know and I'll do some testing over the weekend when I get a chance, just to backup my assumptions.

erm3nda
erm3nda

It's my first time with octobercms. Code view? don't!! The first time i used code view i got: syntax error, unexpected '{', expecting function (T_FUNCTION). If i put {% component "menu" %} to code view result is: <?php {% component "menu" %} ?> wich causes the same error again.

Extra: Do not like too much code view. tried to add a function with echo then call it but nothing happend. Really dont know the sense of that "code view".

Thank you.

Last updated

benfreke
benfreke

If you're not comfortable with the code section, then just use the admin view?

This is the page that explains what I meant by the code view. It should have been code section.

By the sounds of it, what you're doing wrong is using October the wrong way. It has its quirks on how things should be done. Do it the October way (there is a learning curve) and you should be fine though.

erm3nda
erm3nda

Humm... I tried to use as any other twig code like "{% partial "footer" %}" wich includes the called partial. I'm using the built-in admin editor, wich has "markup" and "code". I don't know nor read on the documentation about initialize.

"By the sounds of it, what you're doing wrong is using October the wrong way. " :| I'm not sure. Now i play a little and know the sense of that code view with = separators. Anyway cannot make work.

benfreke
benfreke

Sorry, I didn't see this reply.

Ok, so in the admin view. If you click on the component, which is in the blue bar (below the title area, which has an orange background, and above the settings area which has a white background), what is the alias value of the Menu Manager component? That needs to match the alias you've used in the page.

So, if it has an alias of mainmenu-example , then the code within the page should be {% component "mainmenu-example" %}

Does that change anything?

erm3nda
erm3nda

I tried to add the user loging component to test what I'm doing, was succesfull and i can see it.

  1. Add the block, then call it on the template with {% component "account" %}.

Now on menumanager.

  1. I created a new menu from menumanager. Called it "menu3" and linked to home.
  2. Added {% component "menu3" %}. Normal page display, without menu.
  3. Added {% component "menuX" %}. Error, ("The component 'menuX' is not found.").

Last updated

benfreke
benfreke

Point 3, of course the component isn't found if you haven't added it.

Point 2, it's working. So it's not configured correctly. It will display everything under the start node. So, by the sounds of it you haven't set up the menu structure in the back end correctly. Do you have a top level node, named something similar to "main menu"? Underneath that, do you have another menu item, e.g. "example 1" linking to any page on the site? If the start node of menu component on your page is "main menu", does a single link called "example 1" display.

erm3nda
erm3nda

Aha! The drag and drop feature from backend option "reorder menus". I see it and successfully called the menĂº. Thanks.

benfreke
benfreke

No worries, glad we got it working! Hope you're having fun with October :)

1-10 of 10