0

I create CMS static block Identifier :header_menu_top

app/design/frontend/Vendor/themeXXX/Magento_Theme/layout/default.xml

  <referenceBlock name="header.panel">
  <block class="Magento\Cms\Block\Block" name="header_menu_top">
     <arguments>
         <argument name="block_id" xsi:type="string">header_menu_top</argument>
     </arguments>
  </block>
  </referenceBlock>

But Can not display to top header , Actuality i want to show below

app/design/frontend/Vendor/MyTheme/Vendor_MyTheme/templates/html/header.phtml

1 Answer 1

2

At last i got solution to call phtml page .

app/design/frontend/Vendor/MyTheme/Vendor_MyTheme/templates/html/header.phtml

  <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('header_menu_top')->toHtml();?> 

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.