I want to call a static navigation block in topmenu.phtml
I defined that in default.xml
<block class="Magento\Cms\Block\Block" name="top_links">
<arguments>
<argument name="top_links" xsi:type="string">top_links</argument>
</arguments>
</block>
And calling in .phtml
like this.
<nav class="navigation" data-action="navigation">
<ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
<?php echo $this->getLayout()->getBlock('top_links')->toHtml();?>
</ul>
</nav>
But its not working please suggest how to do this.
I don't want to call direct on .phtml
like this.
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>