How to display custom block in product_list_toolbar?

by SebastianT   Last Updated August 14, 2019 14:09 PM

I have a problem with displaing my custom block in toolbar toolbar-products between sorter and toolbar-amount. I tried this code:

<referenceBlock name="product_list_toolbar">
<block class="Vendor\Module\Block\CategoriesSiblings" name="categoriessiblings" template="Vendor_Module::categoriessiblings.phtml"/>
</referenceBlock >

in my catalog_category_view.xml but nothing shows. I can display this block without problems in:

<referenceContainer name="content">

Thanks in advance for any help

Answers 1

Replace you code with following

<referenceBlock name="product_list_toolbar"template="Vendor_Module::categoriessiblings.phtml"/>

You have to add default toolbar.phtml code into your custom template and also you can add your custom element in this template

August 14, 2019 13:03 PM

Related Questions

How do i hide description block if no data found

Updated March 17, 2017 10:09 AM

Adding a block to a specific location

Updated April 08, 2015 21:03 PM

Custom Block "Invalid Block Type"

Updated June 01, 2015 03:04 AM