I want to add cms block above description, how to do in custom theme?

1 Answer 1


Add the below code in your catalog_product_view.xml file,

    <referenceContainer name="content"> 
            <block class="Magento\Cms\Block\Block" name="demo" before="product.info.details"> 
                    <argument name="block_id" xsi:type="string">demo</argument> 
  • I i did, its not applied, i am created cms static block id= "1", identifier= "demo" just put into your script, its not working.
    – zus
    Jan 12, 2021 at 11:37
  • instead of "block_identifier" use your block identifier. Jan 12, 2021 at 11:48
  • I am getting following error, 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'name': [facet 'pattern'] The value 'block identifier' is not accepted by the pattern '[a-zA-Z0-9][a-zA-Z\d-_.]*'. Line: 1195
    – zus
    Jan 12, 2021 at 11:54
  • please share your code.. Jan 12, 2021 at 11:55
  • <referenceContainer name="content"> <block class="Magento\Cms\Block\Block" name="block identifier" before="product.info.details"> <arguments> <argument name="1" xsi:type="string">demo</argument> </arguments> </block> </referenceContainer>
    – zus
    Jan 12, 2021 at 11:56

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.