Magento Custom Page Templates

In Magento it is possible to create more page templates than the traditional 1-column, 2-columns-left (etc) options that we’re given by default. These page templates are defined in XML configuration, which means to add others you’ll need to create a module with config.xml.

In the below example I’ll create a custom page template for my CMS homepage.


        <homepage_layout translate="label">
          <label>Homepage Layout</label>

After doing this, simply create homepage.phtml within your theme template’s ‘page’ directory. To declare your module’s existence, don’t forget your module activation file:



Following this, you will now have ‘Homepage Layout’ as an available page template for products, CMS pages, categories and so on.

Custom Page Template
Assigning a custom page template

Remember you can also register your custom page templates within layout XML handles using ‘setTemplate’:

<reference name="root">
	<action method="setTemplate"><template>page/homepage.phtml</template></action>
  • rohit patel

    great thing

  • Nenad

    Great Job