如何删除Magento中的排序选项(product_list_toolbar)

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.

  1. Comment out the following piece of code from the catalog/product/list.phtml file <?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/toolbar_top.phtml')->toHtml(); ?>
  2. Simply hide the sorting options with CSS i.e. .toolbar { display: none; }
  3. Unfortunately there does not seem to be a simple way of removing the sorting options by adding a layout handle to the layout.xml file, here is a solution I found with the layout.xml file but I decided to go with 2nd option.

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.