- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020
10:43 PM
03-04-2020
10:43 PM
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.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020
10:47 PM
03-04-2020
10:47 PM
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020
10:47 PM
03-04-2020
10:47 PM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020
11:11 PM
03-04-2020
11:11 PM
Re: Showing static block on navigation
Thanks it is working fine.