1

How to call a static block call every cms page in Magento 2.2

1 Answer 1

4

You need to override cms_page_view.xml layout file in your theme/module.

In that file, you need call static block over there with static block id:

<block class="Magento\Cms\Block\Block" name="block_identifier">
        <arguments>
            <argument name="block_id" xsi:type="string">static_block_id</argument>
        </arguments>
    </block>
2
  • Please accept the answer if it works for you as it can help others to identify solution easily.
    – Sarvagya
    May 11, 2018 at 10:15
  • @Sarvagya Correct, Please accept this as an answer if it's correct.
    – Nits
    May 11, 2018 at 11:23

Your Answer

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

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