2

Hey I'm trying to add a menu item in the Magento 2 backoffice but I want to create sections like this (Elements & Design):

enter image description here

Here is my Arno/Blog/etc/adminhtml/menu.xml:

<menu>
    <add id="Arno_Blog::main" title="Arno Blog" sortOrder="100" module="Arno_Blog" resource="Arno_Blog::main"/>

    <add id="Arno_Blog::main_blog" title="Blog"  module="Arno_Blog" resource="Arno_Blog::main_blog" parent="Arno_Blog::main"/>

    <add id="Arno_Blog::posts" title="Manage Blog posts"  module="Arno_Blog" resource="Arno_Blog::posts"
         parent="Arno_Blog::main_blog" action="arno_blog/blog"/>

</menu>

I think I'm doing it right but I still don't get the 'Blog' section.

enter image description here

4

This is not a fault in your code but a feature (or bug) in Magento 2.2.x, that it does not show parent menu title if it has only one submenu.

Please check:

https://github.com/magento/magento2/issues/13707

and

https://github.com/magento/magento2/commit/d91e96b529e70dcec55d3b5336b471791dc42d54

Please try to add multiple menu items (having at least one submenu item) and then check.

  • This is indeed the problem I added my items to the "content" main menu item and this works. Thanks – Arno Vande Cappelle Oct 10 '18 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.