Latest from Twitter
Magento – Add different toolbars in product listing page
Posted date: 14 Sep 2011 | Posted by: admin | 0 comments
In one project, i needed to create a top toolbar and a bottom toolbar to make the navigation more easily and beautiful in the product listing page. The problem is the styles of the top toolbar need to be different from the one of the bottom toolbar. Also, only the bottom toolbar has a pager and a back to top botton. By default, Magento just supports the same styles and elements for both of toolbars.
After a while, i found the way to do and applied it to this project. So now, i will show you guys who have the same problem with Magento toolbars.
In the app/design/frontend/default/default/template/catalog/product/list.phtml file, from the bottom, replace the following line (keep the line in the top):
<?php echo $this->getToolbarHtml() ?>
<?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/toolbar_bottom.phtml')->toHtml(); ?>
Of course, you need to create the toolbar_bottom.phtml file in the catalog/product/list folder (copy from the toolbar.phtml file and change the content, also styles to whatever you like!)
If you have any problem, feel free to comment here!