When I create a new page in Magento 2 using the "two columns with left bar" layout it by default puts the wishlist in there.
Using the "layout update XML" in the design options tab I can remove that using this:
<referenceBlock name="wishlist_sidebar" remove="true"/>
What I also want to do is replace it with my own static block. I thought something like the following would do the trick but it does not. Can someone help?
<container name="sidebar.additional">
<block class="Magento\Cms\Block\Block" name="test" />
</container>
Best Answer
To reference a container you need to use
referenceContainer
as opposite toreferenceBlock
to reference a block.The
container
tag is used to create a container as theblock
tag is used to create a block.In your case, the right code would be:
This is assuming your cms block id is
test
, you'll need to replace that value in case it is different