Skip to content

Instantly share code, notes, and snippets.

@acataluddi
Forked from raivis-vitols/local.xml
Created February 5, 2018 17:42
Show Gist options
  • Save acataluddi/6dd8a53ef667a1bb21e39bbc59c27539 to your computer and use it in GitHub Desktop.
Save acataluddi/6dd8a53ef667a1bb21e39bbc59c27539 to your computer and use it in GitHub Desktop.
Magento local.xml layout file boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Head Block Modifications For All Pages-->
<reference name="head">
<!-- Add CSS and JS, Files From Skin Folder -->
<action method="addItem"><type>skin_css</type><name>css/styles.css</name></action>
<action method="addItem"><type>skin_js</type><name>js/script.js</name></action>
<!--Remove CSS and JS, Files From Skin Folder-->
<action method="removeItem"><type>skin_js</type><name>js/script.js</name></action>
<action method="removeItem"><type>skin_css</type><name>css/styles.css</name></action>
<!--Remove JS, Files From JS Folder-->
<action method="removeItem"><type>js</type><name>js/script.js</name></action>
<!-- Old Browser Support Files From Base Theme -->
<action method="removeItem"><type>skin_js</type><name>js/ie6.js</name></action>
<action method="removeItem"><type>js</type><name>lib/ds-sleight.js</name></action>
<!-- Add Text Block To Head - Useful For Fonts, Meta Tags, Etc. -->
<block type="core/text" name="head.meta.viewport">
<action method="setText">
<text><![CDATA[<meta name="viewport" content="width=device-width,initial-scale=1">]]></text>
</action>
</block>
</reference>
<!-- Header Modifications For All Pages -->
<reference name="header">
<!-- Append CMS Block By Identifier -->
<block type="cms/block" name="header.cms.block" as="headerCmsBlock">
<action method="setBlockId"><block_id>header_cms_block</block_id></action>
</block>
</reference>
<!-- Change Block's Template -->
<reference name="catalog.topnav">
<action method="setTemplate">
<template>catalog/navigation.phtml</template>
</action>
</reference>
<!-- Change Block's Template Based On Configuration -->
<reference name="catalog.topnav">
<action method="setTemplate" ifconfig="catalog/navigation/use_alt">
<template>catalog/navigation_alt.phtml</template>
</action>
</reference>
<!-- Before Body End Reference -->
<reference name="before_body_end">
</reference>
<!-- After Body Start Reference -->
<reference name="after_body_start">
</reference>
<!-- Remove Default Sidebar Blocks -->
<remove name="cart_sidebar"/> <!-- Mini Cart -->
<remove name="wishlist_sidebar"/> <!-- Wishlist -->
<remove name="right.reports.product.compared"/> <!-- Compared Products -->
<remove name="catalog.compare.sidebar"/> <!-- Products Compare -->
<remove name="right.reports.product.viewed"/> <!-- Viewed Products -->
<remove name="catalog.product.related"/> <!-- Related Products -->
<remove name="right.permanent.callout"/> <!-- Right Callout Sample Data -->
<remove name="left.permanent.callout"/> <!-- Left Callout Sample Data -->
<remove name="paypal.partner.right.logo"/> <!-- Paypal Logo Sample Data -->
<remove name="catalog.leftnav"/> <!-- Default Layered Navigation -->
<remove name="catalogsearch.leftnav"/> <!-- Search Layered Navigation -->
<remove name="right.poll"/> <!-- Poll -->
<remove name="tags_popular"/> <!-- Tags -->
<remove name="left.newsletter"/> <!-- Newsletter-->
<remove name="customer_account_navigation"/> <!-- Dashboard Navigation -->
<remove name="sale.reorder.sidebar"/> <!-- Dashboard Reorder Sidebar -->
</default>
<!-- Creating Custom Layout Handle -->
<include_jquery>
<!-- ... -->
</include_jquery>
<!--Using Custom Layout Handle-->
<catalog_category_default>
<update handle="include_jquery"/>
</catalog_category_default>
<catalog_category_layered>
<update handle="include_jquery"/>
</catalog_category_layered>
<!-- List Of Most Popular Layout Handles -->
<!-- Home Page -->
<cms_index_index>
</cms_index_index>
<!-- Cms Pages -->
<cms_page>
</cms_page>
<!-- Contacts Page -->
<contacts_index_index>
</contacts_index_index>
<!-- Category View -->
<catalog_category_view>
</catalog_category_view>
<!-- Anchor Category View -->
<catalog_category_layered>
</catalog_category_layered>
<!-- Catalogsearch Result Page -->
<catalogsearch_result_index>
</catalogsearch_result_index>
<!-- Advanced Search Result Page -->
<catalogsearch_advanced_result>
</catalogsearch_advanced_result>
<!-- Advanced Search Page -->
<catalogsearch_advanced_index>
</catalogsearch_advanced_index>
<!-- Product View -->
<catalog_product_view>
</catalog_product_view>
<!-- Product View By Type -->
<PRODUCT_TYPE_giftcard>
</PRODUCT_TYPE_giftcard>
<!-- Cart -->
<checkout_cart_index>
</checkout_cart_index>
<!-- Onepage Checkout Index Page -->
<checkout_onepage_index>
</checkout_onepage_index>
<!-- Onepage Checkout Success Page -->
<checkout_onepage_success>
</checkout_onepage_success>
<!-- Customer Dashboard -->
<customer_account>
<!-- Add Body Class On All Dashboard Pages -->
<reference name="root">
<action method="addBodyClass">
<className>customer-account-page</className>
</action>
</reference>
</customer_account>
<!-- Customer Dashboard -->
<customer_account_index>
</customer_account_index>
<!-- Wishlist View -->
<wishlist_index_index>
</wishlist_index_index>
<!-- Customer Logged In -->
<customer_logged_in>
</customer_logged_in>
<!-- Customer Logged Out -->
<customer_logged_out>
</customer_logged_out>
<!-- Customer Orders History -->
<sales_order_history>
</sales_order_history>
<!-- Customer Order View -->
<sales_order_view>
</sales_order_view>
<!-- Guest Order View -->
<sales_guest_view>
</sales_guest_view>
<!-- Customer Creditmemo View -->
<sales_order_creditmemo>
</sales_order_creditmemo>
<!-- Guest Creditmemo View -->
<sales_guest_creditmemo>
</sales_guest_creditmemo>
<!-- Customer Invoice View -->
<sales_order_invoice>
</sales_order_invoice>
<!-- Guest Invoice View -->
<sales_guest_invoice>
</sales_guest_invoice>
<!-- Order Tracking View -->
<shipping_tracking_view>
</shipping_tracking_view>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment