How can you remove the sorting option (toolbar_top block / product_list_toolbar) at the top of the product listings in Magento?
Do I need to edit the local.xml or toolbar.phtml files?
After a little research I have found three ways to do this but the third way seems a little too complicated.
<?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/toolbar_top.phtml')->toHtml(); ?>
.toolbar { display: none; }
Unfortunately there is no "clean method" to remove the toolbar other then commenting out the toolbar in catalog.xml or in my opinion the cleaner way is to use local.xml to update the toolbar to use a blank template. i.e.
<?xml version="1.0" ?>
<layout>
<catalog_category_layered>
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>catalog/blank.phtml</template>
</action>
</reference>
</catalog_category_layered>
<catalog_category_default>
<reference name="product_list_toolbar">
<action method="setTemplate">
<template>catalog/blank.phtml</template>
</action>
</reference>
</catalog_category_default>
</layout>
Note: blank.phtml file is inside my_package/my_theme/template/catalog/
This will remove the toolbar on all category pages layered and non.