cancel
Showing results for 
Search instead for 
Did you mean: 

Remove product list tool bar

Remove product list tool bar

How do I do this on a new product list created in a block? I have tried:

hide_toolbar="1" in the block parameters

Also

<referenceContainer name="product_list_toolbar" display="false" /> in the layout XML update

 

Magento 2.1.13

Ultimo theme

2 REPLIES 2

Re: Remove product list tool bar

Hi ken,

You can remove toolbar by commenting in list.phtml the 2 lines with

<?php echo $block->getToolbarHtml() ?>

To hide it only in category page than wrap getToolbarHtml() with an if statement.

<?php if (!$this->getMyHideFlag()): ?>
  <?php echo $block->getToolbarHtml() ?>
<?php endif; ?>

In custom module's layout/catalog_category_view.xml add 'my_hide_flag' argument (or use layout instruction <action>). Set this 'my_hide_flag' to 1. Reference the block 'category.products.list'.

 

if issue solved,Click Kudos & Accept as Solution

Re: Remove product list tool bar

Just try to add to Layout Update XML this (use display="false" param instead of remove="true"):

<referenceBlock name="product_list_toolbar" display="false" />

then clean cache and toolbar should disappear.

E-commerce specialist working on Magento Platform, developing custom extension, providing midrations and website optimizations.Also handling tasks of website development.