Uses of this functionality may vary, but we find it inevitable that you need to add your own CMS template to magento. Most often we need to do this to add a custom homepage template which typically has a very different layout to the rest of your shop. Short of putting everything into your CMS page itself which can be messy and make it easy to break a page we would recommend any non-cms content/functionality be put in the template (You could always call in some less frequently edited pieces of content via a few static blocks).

So, we’ll start with the standard module XML file:

<?xml version=”1.0″?>
<config>
<modules>
<Designthatfits_Newtemplates>
<active>true</active>
<codePool>community</codePool>
<depends>
<Mage_Page />
</depends>
</Designthatfits_Newtemplates>
</modules>
</config>

And set up our file/folder structure within app/code/community:

  • Designthatfits/Newtemplates/etc/config.xml
And in the template folder: /app/design/frontend/default/yourtheme/template/page/home.phtml

Adding a new page template is probably one of the most basic extensions and only requires the following within the config.xml file:

<?xml version=”1.0″?>
<config>
<modules>
<Designthatfits_Newtemplates>
<version>0.1.0</version>
</Designthatfits_Newtemplates>
</modules>
<global>
<page>
<layouts>
<home translate=”label”>
<label>Home</label>
<template>page/home.phtml</template>
<layout_handle>page_home</layout_handle>
</home>
</layouts>
</page>
</global>
</config>

By placing your new templates withing the <layouts> section you define a) the location of the template file, b) it’s name, c) it’s handle.

The final task is to fill your phtml file with the relevant content. Refresh your cache and indexes and you should then be able to access the new template when creating your CMS page.

M&S Cyber Attack - Anonymous Hacker
E-commerce
David Pratt

M&S Cyber Attack – How Do I Protect My Ecommerce Website?

In light of the recent cyber attack on Marks & Spencer, ecommerce security has once again been pushed into the spotlight. Here we explore what happened, why it matters, and how ecommerce business owners using Magento, Shopify or WooCommerce can reduce their risk and strengthen defences.
Read More »
Why Is My Website Not Getting Any Sales - Frustrated
E-commerce
Stacey Pratt

Why Is My Website Not Getting Any Sales?

Struggling to convert traffic into customers? From poor user experience to limited payment options and lack of marketing activity, there are many reasons your online store might not be performing. Let’s go over the most common pitfalls that hold eCommerce businesses back, and how to fix them. Whether you’re using Magento, Shopify, or WooCommerce, these insights could be the key to unlocking better sales!
Read More »
eCommerce Checkout Screen
Adobe Commerce
Stacey Pratt

Will New Buy Now Pay Later Rules Affect My Online Shop?

New UK regulations are coming for Buy Now, Pay Later (BNPL) services like Klarna and Clearpay, aiming to protect customers with affordability checks and clearer terms. But what does this mean for your eCommerce store? Find out what’s changing, when it’s happening, and how it may (or may not) affect your online checkout. It’s nothing to panic about, but it’s worth being prepared.
Read More »
DTF Digital