I want to show static block on frontend navigation.
As i want to show some static links there.
So can anybody please help me with this.
Any help would be appreciated.
Solved! Go to Solution.
Hi @akashay _kc
for this you have to create a static block from admin in admin->content->block.
After that just go to your theme and inside Magento_Theme->layout->default.xml add the below code.
<referenceContainer name="catalog.topnav"> <block class="Magento\Cms\Block\Block" name="header.top.menu" before="-"> <!--Where header.top.menu - block name (optional)--> <arguments> <argument name="block_id" xsi:type="string">header_menu</argument> <!--Where header_menu - CMS block identifier, that you will create in the admin panel --> </arguments> </block> </referenceContainer>
After that flush the cache and check the result.
Thanks
Hi @akashay _kc
for this you have to create a static block from admin in admin->content->block.
After that just go to your theme and inside Magento_Theme->layout->default.xml add the below code.
<referenceContainer name="catalog.topnav"> <block class="Magento\Cms\Block\Block" name="header.top.menu" before="-"> <!--Where header.top.menu - block name (optional)--> <arguments> <argument name="block_id" xsi:type="string">header_menu</argument> <!--Where header_menu - CMS block identifier, that you will create in the admin panel --> </arguments> </block> </referenceContainer>
After that flush the cache and check the result.
Thanks
Thanks it is working fine.