cancel
Showing results for 
Search instead for 
Did you mean: 

Move element by *.xml

Move element by *.xml

Hi all,

I trying to move the product list toolbar to another place, for this I use this code:

<move element="product_list_toolbar" destination="columns" after="-" />

And all works fine, but I need place the block before the "destination='columns'", and when I use this code:

 

<move element="product_list_toolbar" destination="columns" before="-" />

All front-end is failed, nothing is loaded. What's the problem in my variant, also I trying use not only "destination='columns'" and all works the same.

 

 

3 REPLIES 3

Re: Move element by *.xml

You are using the right approach, but have some internal error.
See how to diagnose Magento 2 errors:  https://mage2.pro/t/307

 

Re: Move element by *.xml

Thanks, i found errors:

Fatal error: Call to a member function getSize() on null in vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar.phtml on line 18
Fatal error: Call to a member function getLastPageNumber() on null in vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php on line 623

Re: Move element by *.xml

Same problem here. The toolbar moves correctly, but then the Category page throws a Fatal Error:

Fatal error: Uncaught Error: Call to a member function getSize() on null in /app/design/frontend/MyCompany/MyTheme/Magento_Catalog/templates/product/list/toolbar.phtml on line 18

Did you find a fix for it? Thanks.