Hi,
I'm trying to put my own static cms block to the column of the right in the product view (to all products).
- I create the CMS block identifier="first_block" (i notice that the content editor doesn't works in Mozilla)
- And i add this code to:
app/design/frontend/{Package}/{theme}/Magento_Catalog/layout/catalog_product_view.xml
<?xml version="1.0"?> <page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <!--referenceContainer name="sidebar.additional"--> <referenceContainer name="content"> <referenceBlock name="catalog.compare.sidebar" remove="true"/> <block class="Magento\Cms\Block\Block" name="first_block"> <arguments> <argument name="block_id" xsi:type="string">bla</argument> </arguments> </block> </referenceContainer> </body> </page>
I tried to change argument name to first_block too, but nothing change... i can't see the new block.
Any idea.
Regards
Solved! Go to Solution.
I have an error in my syntax
<referenceContainer name="sidebar.additional"> <block class="Magento\Cms\Block\Block" name="first_block"> <arguments> <argument name="block_id"
xsi:type="string">first_block</argument> </arguments> </block> </referenceContainer>
I have an error in my syntax
<referenceContainer name="sidebar.additional"> <block class="Magento\Cms\Block\Block" name="first_block"> <arguments> <argument name="block_id"
xsi:type="string">first_block</argument> </arguments> </block> </referenceContainer>