Magento – Removal of the navigation pages in a category via XML

Picture

Who on in a special category page navigation (“See X per page”, “Sort by”, “View as”, “X Articles”) want to miss, this can really about the “remove” Command in your own design or. “Custom Layout Update” of each category with the command:

Picture

 

<remove name="product_list_toolbar"/>

 

be done. This works but unfortunately not.

The reason is in the file “list.phtml” im Ordner / app / design / frontend /[usually base, rare default]/default/template/catalog/product/list.phtml zu finden. This is generally called the Navigation Pane and the designation of the block avoided. Therefore, the remove command has no function.

To change this now, copy the o.g. File into its own Template (Bzgl. Update Capability) e.g.. in the folder / app / design / frontend /[base or default]/[IhrTemplate]/template/catalog/product/list.phtml und ändert den Code

 

<?php echo $this->getToolbarHtml() ?>

 

as. in line 45 into

 

<?php echo $this->getChildHtml('product_list_toolbar') ?>

 

Of course, it may be, that the toolbar is called in several times or even list.phtml, that there is a plug, which overrides the default list.

And then simply stored, uploaded and possibly. the cache can be reloaded. Now the navigation bar to be removed.

One way to prevent the toolbar in general and to make this not comment out or delete (it can therefore be quickly reversed), would be creating your own custom template layout folder in local.xml (further information and HERE in the blog Webguys).
In this case we want to prevent the toolbar generally and therefore write in the following code local.xml:

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="happy">
            <remove name="product_list_toolbar"/> 
        </reference>
    </default>
</layout>

Used in Magento versions 1.5.1.0 and 1.7.0.2 Comments? Additions? Notes? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

Leave a Reply

Your email address will not be published. Required fields are marked *