1

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">
        <arguments> 
            <argument name="alias" xsi:type="string">menu-top</argument> 
        </arguments> 
    </block>
</referenceBlock>

Thank you.

1 Answer 1

0

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.

1
  • 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 Commented Jun 5, 2019 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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