Book Image

Learning Magento Theme Development

By : Richard Carter
Book Image

Learning Magento Theme Development

By: Richard Carter

Overview of this book

Table of Contents (15 chapters)
Learning Magento Theme Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing the home page's layout


You have seen how to apply a page layout to specific pages, but to apply a specific template to your store's home page, you can add more specific layout instructions in your theme's local.xml file.

The layout handle for the home page is cms_index_index. So, to assign the home page the one column layout, you will add the following to your Magento theme's local.xml file:

<cms_index_index>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
</cms_index_index>

Note, though, that the layout can be overwritten through Magento's CMS tool, so this is unlikely to work in practice. You can navigate to CMS | Pages in your Magento installation's administration panel and set your page's layout using the Layout drop-down field in the Design tab:

Note

An incomplete list of layout handles available in Magento is available at http://www.magentocommerce.com/boards...