Reputation: 21
I am using MAgento 2.1.8 but i am stuck in moving static block to bottom of product list of a category page as i want to write the content Before and after to products.
Upvotes: 2
Views: 3227
Reputation: 71
Go to product view phtml file and call your static block where you want to call
<?php echo $block->getLayout()->createBlock(‘Magento\Cms\Block\Block’)->setBlockId(‘block_identifier’)->toHtml();?>
Upvotes: 0
Reputation: 307
If you have child theme then override the catalog_category_view.xml. To override the xml file follow the below steps.
add the code below body tag
<move element="category.cms" destination ="content" after="category.product"/>
If you do not have child theme. Then you will have to create child from the given link below and repeat step from 1 to 3 http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-create.html
Upvotes: 8