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.
1 Answer 1
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.
-
Sorry but its not working.Deepak K– Deepak K2016年09月29日 12:19:08 +00:00Commented 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/cnrx90Deepak K– Deepak K2016年09月29日 13:50:03 +00:00Commented Sep 29, 2016 at 13:50