I am including the extension Ves MegaMenu in my theme in default.xml.
How can I wrap this within a container?

<referenceBlock name="page.wrapper">
    <block class="Ves\Megamenu\Block\Menu" name="catalog.topnav" after="header.container" template="Ves_Megamenu::topmenu.phtml">
            <argument name="alias" xsi:type="string">menu-top</argument> 

Thank you.

1 Answer 1


you may try this

<container name="my.container" label="My Wrapper" htmlTag="div" htmlClass=""/> <!-- declare your new container-->           
<move element="catalog.topnav" destination="my.container"  after="page.wrapper"  /> <!-- move  your desire block to your new container-->

After that do cache refresh.

  • It doesn't seem to display when I use the above code. I actually have a container I can put it in "navigation.sections". I've tried the following but it doesn't display: <move element="catalog.topnav" destination="navigation.sections" after="-"/> Any ideas? Thanks Jun 5, 2019 at 11:42

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.