如何从添加到主页 CMS 页面 magento2 的产品列表页面中隐藏工具栏。
我在 CMS 主页中添加了块,如下所示:
{{block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml" category_id="3"}}
并添加 xml 代码以删除 Layout Update XML 中的工具栏,如下代码:
<referenceBlock name="product_list_toolbar" remove="true" />