A great Start for your next Magento Theme's local.xml file

Overview

Magento-local.xml-Template

A Great Start for your next Magento Theme's local.xml file -

<?xml version="1.0"?>
<layout>
  
<!--
Add/Remove Items From Head
-->
  <default translate="label" module="page">
    <reference name="head">
      <!-- Add Javascript File -->
      <action method="addItem"><type>skin_js</type><name>js/jquery.js</name><params/></action>
      <!-- Add CSS File -->
      <action method="addCss"><stylesheet>css/local.css</stylesheet></action>
    </reference>
  </default>

<!--
Default layout, loads most of the pages
-->
  <default>
  
    <!-- Add Custom Block 
    <reference name="root">
      <block type="core/template" before="-" name="my_block" as="my_block" template="path/to/file.phtml"/>
    </reference>
    -->
    
    <!-- Header -->
    <reference name="header">
      <!-- Insert Code Here -->
    </reference>

    <!-- Left Sidebar -->
    <reference name="left"> 
      <!-- Insert Code Here -->
    </reference> 

    <!-- Right Sidebar -->
    <reference name="right">
       <remove name="right.poll" />
    </reference>

    <!-- Content -->
    <reference name="content">
      <!-- Insert Code Here -->
    </reference>

    <!-- Top Nav -->
    <reference name="top.nav">
      <!-- Insert Code Here -->
    </reference>

  </default>

<!--
CMS Layout
-->
  <cms_page>

    <!-- Header -->
    <reference name="header">
      <!-- Insert Code Here -->
    </reference>

    <!-- Left Sidebar -->
    <reference name="left"> 
      <!-- Insert Code Here -->
    </reference> 

    <!-- Right Sidebar -->
    <reference name="right">
      <!-- Insert Code Here -->
    </reference>

    <!-- Content -->
    <reference name="content">
      <!-- Insert Code Here -->
    </reference>

  </cms_page>

<!--
CMS Homepage
-->
  <cms_index_index>

    <!-- Header -->
    <reference name="header">
      <!-- Insert Code Here -->
    </reference>

    <!-- Left Sidebar -->
    <reference name="left"> 
      <!-- Insert Code Here -->
    </reference> 

    <!-- Right Sidebar -->
    <reference name="right">
      <!-- Insert Code Here -->
    </reference>

    <!-- Content -->
    <reference name="content">
      <!-- Insert Code Here -->
    </reference>

  </cms_index_index>



<!--
Catalog Category Layout
-->
  <catalog_category_default translate="label">
    <!-- Insert Code Here -->
  </catalog_category_default>  

<!--
Catalog Product View Layout
-->
  <catalog_product_view translate="label">
    <!-- Insert Code Here -->
  </catalog_product_view>  

<!--
Catalog Layered Layout
-->
   <catalog_category_layered translate="label">
    <!-- Insert Code Here -->
   </catalog_category_layered>

<!--
Catalog Search Results Layout
-->
  <catalogsearch_result_index translate="label">
    <!-- Insert Code Here -->
  </catalogsearch_result_index>

<!--
Catalog Advanced Search Layout
-->
  <catalogsearch_advanced_index translate="label">
    <!-- Insert Code Here -->
  </catalogsearch_advanced_index>  

<!--
Catalog Advanced Search Results Layout
-->
  <catalogsearch_advanced_result translate="label">
    <!-- Insert Code Here -->
  </catalogsearch_advanced_result>  

<!--
Cart Template
-->
  <checkout_cart_index translate="label">
   <!-- Insert Code Here -->
  </checkout_cart_index>

<!--
OnePage  Layout
-->
  <checkout_onepage_index>
   <!-- Insert Code Here -->
  </checkout_onepage_index>

<!--
OnePage Success Layout
-->
  <checkout_onepage_success>
  <!-- Insert Code Here -->
  </checkout_onepage_success>
  
<!--
Contact Page Template
-->
  <contacts_index_index translate="label">
    <!-- Insert Code Here -->
  </contacts_index_index>

<!--
Customer Account Layout
-->
  <customer_account>
    <!-- Insert Code Here -->
  </customer_account>

<!--
Customer Account
-->
  <customer_account>
  <!-- Insert Code Here -->  
  </customer_account>

<!--
Customer Login Page
-->
  <customer_account_login>
  <!-- Insert Code Here -->  
  </customer_account_login>

<!--
Customer Forgot Password
-->
  <customer_account_forgotpassword>
  <!-- Insert Code Here -->  
  </customer_account_forgotpassword>

<!--
Customer Logged In
-->
  <customer_logged_in>
    <!-- Insert Code Here -->
  </customer_logged_in>

<!--
Customer Logged Out
-->
  <customer_logged_out>
    <!-- Insert Code Here -->
  </customer_logged_out>

</layout>

<!-- List of Usefull Removals
    <remove name="catalog.compare.sidebar" />
    <remove name="right.permanent.callout" />
    <remove name="left.permanent.callout" />
    <remove name="left.newsletter" />
    <remove name="right.reports.product.viewed" />
    <remove name="paypal.partner.right.logo" />
    <remove name="right.poll" />
    <remove name="cart_sidebar" />
    <remove name="checkout_cart_link" />
    <remove name="catalog.compare.list" /> -->

Available layout xml handles

default
catalog_category_default    (* also used in directory.xml)
catalog_category_layered    (* also used in directory.xml)
catalog_product_compare_index
catalog_product_gallery
catalog_product_send
catalog_product_view   (* also used in customeralert.xml, tag.xml)
catalog_seo_searchterm_popular
catalog_seo_sitemap_category
catalog_seo_sitemap_product

catalogsearch_advanced_form
catalogsearch_advanced_result
catalogsearch_result_index
catalogsearch_term_popular

checkout_cart_index      (* also used in googlecheckout.xml, paypal.xml)
checkout_multishipping
checkout_multishipping_address_editaddress
checkout_multishipping_address_editbilling
checkout_multishipping_address_editshipping
checkout_multishipping_address_newbilling
checkout_multishipping_address_newshipping
checkout_multishipping_address_select
checkout_multishipping_address_selectbilling
checkout_multishipping_addresses
checkout_multishipping_billing
checkout_multishipping_customer_address
checkout_multishipping_login
checkout_multishipping_overview
checkout_multishipping_register
checkout_multishipping_shipping
checkout_multishipping_success
checkout_onepage_additional
checkout_onepage_index
checkout_onepage_progress
checkout_onepage_review
checkout_onepage_shippingmethod
checkout_onepage_success

cms_index_defaultindex
cms_index_defaultnoroute


customer_account            (* also used in newsletter.xml, review.xml, sales.xml, wishlist.xml)
customer_account_create
customer_account_edit
customer_account_forgotpassword
customer_account_index      (* also used in catalog.xml, newsletter.xml, poll.xml, review.xml, sales.xml, tag.xml, wishlist.xml)
customer_account_login
customer_address_form
customer_address_index
customer_logged_in
customer_logged_out
customer_account_logoutsuccess

giftmessage_index_edit
giftmessage_index_save
giftmessage_index_remove

newsletter_manage_index

paypal_express_review
paypal_express_review_details

print

review_customer_index
review_customer_view
review_product_list
review_product_view
reviews

sales_order_details
sales_order_history
sales_order_print
sales_order_view

shipping_tracking_ajax

tag_customer_index
tag_customer_edit
tag_customer_view
tag_list_index

wishlist_index_index

Available Attributes

addPriceBlockType:   <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>

addItemRender:   <action method="addItemRender"><type>bundle</type><block>
bundle/checkout_cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>

addItem: <action method="addItem"><type>skin_js</type><name>js/bundle.js</name></action>
insert: <action method="insert"><block>product.info.bundle.options</block></action>

setItemLimit: <action method="setItemLimit"><type>bundle</type><limit>4</limit></action>

setImgSrc: <action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>

setImgAlt: <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action>

setLinkUrl: <action method="setLinkUrl"><url>checkout/cart</url></action>

addLink:   <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>

setDefaultListPerPage: <action method="setDefaultListPerPage"><limit>4</limit></action>

setDefaultGridPerPage: <action method="setDefaultGridPerPage"><limit>9</limit></action>

addPagerLimit: <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>

setToolbarBlockName: <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>

addReviewSummaryTemplate: <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action>

setTemplate: <action method="setTemplate"><template>page/one-column.phtml</template></action>

addJs: <action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>

unsetChild: <action method="unsetChild"><name>catalog_compare_sidebar</name></action>

setTierPriceTemplate: <action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>

setColumnCount: <action method="setColumnCount"><columns>4</columns></action>

setItemLimit: <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>

addOptionRenderer: <action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>

insert: <action method="insert"><block>product.tierprices</block></action>

append: <action method="append"><block>product.info.addtocart</block></action>

setDataByKey: <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>

setDataByKeyFromRegistry: <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>

unsetCallChild: <action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>

setTitle: <action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>

bindPager: <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>

setItemsTitle: <action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>

setListOrders: <action method="setListOrders"/>

setListModes: <action method="setListModes"/>

setListCollection: <action method="setListCollection"/>

addCartLink: <action method="addCartLink"></action>

addCheckoutLink: <action method="addCheckoutLink"></action>

setCartTemplate: <action method="setCartTemplate"><value>checkout/cart.phtml</value></action>

setEmptyTemplate: <action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>

chooseTemplate: <action method="chooseTemplate"/>

setMethodFormTemplate: <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>

setInfoTemplate: <action method="setInfoTemplate"><method></method><template></template></action>

setDontDisplayContainer: <action method="setDontDisplayContainer"><param>1</param></action>

setBlockId: <action method="setBlockId"><block_id>footer_links</block_id></action>

setHeaderTitle: <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>

setSaveMode: <action method="setSaveMode"><mode>save</mode></action>

setGoogleCheckout: <action method="setGoogleCheckout"><flag>true</flag></action>

setScriptType: <action method="setScriptType"><scriptType>control_script</scriptType></action>

addCss: <action method="addCss"><stylesheet>css/reset.css</stylesheet></action>

setPollTemplate: <action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>

addWishlistLink: <action method="addWishlistLink"></action>

addBodyClass:  <action method="addBodyClass"><className>account</className></action>

Block Types

core/template: This block renders a template defined by its template attribute. The majority of blocks defined in the layout are of type or subtype of core/template.

page/html: This is a subtype of core/template and defines the root block. All other blocks are child blocks of this block.

page/html_head: Defines the HTML head section of the page which contains elements for including JavaScript, CSS etc.

page/html_header: Defines the header part of the page which contains the site logo, top links, etc.

page/template_links: This block is used to create a list of links. Links visible in the footer and header area use this block type.

core/text_list: Some blocks like content, left, right etc. are of type core/text_list. When these blocks are rendered, all their child blocks are rendered automatically without the need to call thegetChildHtml() method.

page/html_wrapper: This block is used to create a wrapper block which renders its child blocks inside an HTML tag set by the action setHtmlTagName. The default tag is <div> if no element is set.

page/html_breadcrumbs: This block defines breadcrumbs on the page.

page/html_footer: Defines footer area of page which contains footer links, copyright message etc.

core/messages: This block renders error/success/notice messages.

page/switch: This block can be used for the language or store switcher.
You might also like...
A next-generation package manager for the front-end
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Smd horizon - Next/previous Textpattern article without restrictions

smd_horizon The existing tags txp:next_title /, txp:link_to_next / and their prev counterparts cease to function when they reach the first/last po

Next generation airdrop tooling. try me!
Next generation airdrop tooling. try me!

Supporting Airdrop Task Solver Singkatnya, project ini terinspirasi oleh Viloid, tapi ini jauh lebih kompleks. Airdrop Task Solver adalah Aplikasi ber

Chat over your local network: 127.0.0.1

#Howto: install packages: apache2 (or nginx but I wouldn't prefer it if you're using your local computer) php for ubuntu/debian instance: $ apt instal

WordPlate is a wrapper around WordPress. It makes developers life easier. It is just like building any other WordPress website with themes and plugins. Just with sprinkles on top.
WordPlate is a wrapper around WordPress. It makes developers life easier. It is just like building any other WordPress website with themes and plugins. Just with sprinkles on top.

WordPlate is simply a wrapper around WordPress. It makes developers life easier. It is just like building any other WordPress website with themes and plugins. Just with sprinkles on top.

A collection of experimental block-based WordPress themes.
A collection of experimental block-based WordPress themes.

Frost An experimental block theme for designers, developers, and creators. About Frost is a Full Site Editing theme for WordPress that extends the inc

🚀 Font Awesome Icons ⚐ for Hyvä Themes
🚀 Font Awesome Icons ⚐ for Hyvä Themes

Awesome Hyvä by JaJuMa Awesome Hyvä extension by JaJuMa allows to use Font Awesome 5 icons as SVGs on Magento 2 sites using Hyvä Themes. The module in

Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

BreadBooru is a light, quick, and easy to setup imageboard with themes, images, and video support
BreadBooru is a light, quick, and easy to setup imageboard with themes, images, and video support

BreadBooru a bad imageboard, that has nothing to do with (dan/gel)booru, and yet still has booru in the name BreadBooru is a light, quick, and easy to

Owner
Bryan Littlefield
Bryan Littlefield
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Much improved replacement for Zend_Cache_Backend_File - works great with Magento!

Cm_Cache_Backend_File The stock Zend_Cache_Backend_File backend has extremely poor performance for cleaning by tags making it become unusable as the n

Colin Mollenhour 146 Aug 22, 2022
A Zend_Cache backend for Redis with full support for tags (works great with Magento)

Zend_Cache backend using Redis with full support for tags This Zend_Cache backend allows you to use a Redis server as a central cache storage. Tags ar

Colin Mollenhour 389 Jan 4, 2023
Next-generation front-end for Magento 2

The next-generation front-end for Magento 2. Fast. Reliable. Extensible. Getting started – create a new application and deploy it as Magento 2 theme o

ScandiPWA 509 Jan 2, 2023
Magento 2 base theme for sharing features across multiple themes

MASE2 Optimus theme About and purpose Optimus is a free and home-made Magento 2 theme, developed by Studio Emma . Its purpose is providing a starting

Studio Emma 87 Oct 7, 2022
Applies a patch from a local or remote file to any package that is part of a given composer project.

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level in package config or separate JSON file. Declaration-free mode (using embedded info within patch files) is available as well.

Vaimo 245 Dec 15, 2022
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel

Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!

Firebear Studio 173 Dec 17, 2022
WP Local Analytics plugin. - run user analytics within your system and track user data inside your database.

WP Local Analytics plugin. - run user analytics within your system and track user data inside your database.

Gary 5 Dec 21, 2022
GDPR compliant TYPO3 content elements which work great with PIWIK Consent Manager.

PIWIK Consent Manager TYPO3 extension PIWIK Consent Manager integration in order to make TYPO3 content elements GDPR compliant. You can click on the i

null 6 Aug 8, 2022