2

I'm using Magestore's mega menu extension and using a plain content for rendering menu dropdowns. There, I want to use dynamic block's. I tried adding my dynamic block in xml layout file and its working fine there. The code is as below:

<block class="Sebwite\Sidebar\Block\Categorymenutree" name="category-menu-tree" as="catmenutree" before="-" template="Sebwite_Sidebar::categorymenutree.phtml" >
 <arguments>
 <argument name="menu_id" xsi:type="number">239</argument>
 </arguments>
 </block>

So my question is how can I add this block from backend with arguments?

Thanks in advance.

asked Sep 29, 2016 at 8:29

1 Answer 1

0

Go to Content> Pages and click on a page where you want to show your static block. Then add this short-code

{{block class="Sebwite\\Sidebar\\Block\\Categorymenutree" menu_id="239"}}

menu_id attribute is your argument name.

answered Sep 29, 2016 at 8:38
2
  • Sorry but its not working. Commented Sep 29, 2016 at 12:19
  • It seems that mega menu extension doesn't work properly. When I use "content" as content type and then add my block and widgets in it. The code is directly shown at frontend rather dynamic HTML. prntscr.com/cnrx90 Commented Sep 29, 2016 at 13:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.