local.xml

15.11.2012 | Magento

In der local.xml des eigenen Layouts kann man viele Blockeinstellungen vornehmen und auch Basistemplateangaben aus anderen Xmls überschreiben:


<?xml version="1.0" encoding="UTF-8"?>
<layout>
 <default>
  <remove name="left.permanent.callout" /> <!--the dog-->
 <remove name="right.permanent.callout" /> <!--back to school-->
 <remove name="catalog.compare.sidebar" /> <!--product compare-->
 <!--remove name="paypal.partner.right.logo" /--> <!--paypal logo-->
 <!-- remove name="cart_sidebar" / --> <!--cart sidebar-->
 <remove name="left.reports.product.viewed" /> <!--recently viewed prod-->
 <remove name="right.reports.product.viewed" /> <!--recently viewed prod-->
 <!-- remove name="right.reports.product.compared" / --> <!--recently compared prod-->
 
 </default>
 <catalog_category_default>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
</catalog_category_default>
 <catalogsearch_result_index>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
 </catalogsearch_result_index>  

</layout>

Die remove name Angaben entfernen default-Blöcke, die Angaben darunter definieren Standard-Templates.