Change homepage to 1column.phtml in local.xml in new theme in Magento

Change homepage to 1column.phtml in local.xml in new theme in Magento

July 11, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Change homepage to 1column.phtml in local.xml in new theme in Magento

Configuring Your Magento Homepage: Switching to a 1column.phtml Template

Welcome to our guide on customizing your Magento homepage! Today, we’ll walk you through the process of changing your homepage layout from the default 3columns.phtml to a single column template called 1column.phtml. This is a common task for developers looking to create a clean and focused landing page for their e-commerce store.

Understanding Magento Layout XML Files

Before we dive into the code, let’s briefly discuss Magento’s XML layout files. These files use XML syntax to define how your blocks are rendered on specific pages. They allow you to override core templates and behaviors, which is exactly what we’ll do in this tutorial.

For our purposes, we’ll be working with two main files:

  1. local.xml: This is a custom layout file that lives under app/design/frontend/your_package/your_theme/layout/. It allows you to define global changes to your theme’s layout.
  2. Your template file: In your case, this is the 1column.phtml file located at my_theme/default/template/page/1column.phtml.

Modifying the local.xml File

You’ve already started the process by adding a reference to the root node and setting the template to page/1column.phtml. However, there are a few adjustments we need to make for this to work correctly:

<layout version="0.1.0">
    <default>
        <!-- Other default layout modifications -->
    </default>

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

        <reference name="head">
            <action method="addJs"><script>js/script.js</script></action>
        </reference>
    </cms_index_index>
</layout>

There are a few key changes here:

  • We’ve added translate="label" to the <cms_index_index> node. This ensures that any labels defined in your layout are translated using Magento’s translation system.
  • For the JavaScript action, we’ve changed <type>skin_js</type> to <script>js/script.js</script>. This is the correct syntax for adding a custom JavaScript file.

Dealing with Cache Issues

One common issue new developers face is caching. Even after making changes to your local.xml file or template files, you might not see the changes reflected on the frontend. This is because Magento caches its layout XML and template files by default.

To resolve this issue:

  1. Log in to your Magento admin panel.
  2. Navigate to System > Cache Management.
  3. Click on the “Flush Magento Cache” button at the top of the page.
  4. After the cache has been flushed, return to your homepage. You should now see your 1column.phtml template applied.

Verifying Your Custom Homepage

After flushing the cache and refreshing your homepage, you should now be seeing the single column layout defined by your 1column.phtml file. This template is located under my_theme/default/template/page/1column.phtml.

Remember that this template controls the structure of your entire page. You can customize it to include any content or blocks you need for your landing page, such as a hero section, promotional banners, or featured products.

Conclusion

In this guide, we’ve shown you how to set up a custom Magento homepage using a single column layout file called 1column.phtml. By modifying the local.xml file and flushing the cache, you can successfully override the default 3-column layout with your own custom template.

We hope this tutorial has been helpful! If you’re looking for more advanced tips on Magento theme development or e-commerce best practices, be sure to check out our comprehensive guides at Laravel Company.

Happy coding, and let us know if you have any other questions about Magento development!

Indexing Themes Configuration Pricing

Our network