Magento: Custom Page Templates in CMS Layout Dropdown

Creating new page templates is as easy as duplicating and editing the files in /template/page/. However, you can add as many new ones as you want, but no new ones will show up in the Layout dropdown when selecting a template to use for a specific CMS page.

The solution: Create your own simple module to add your templates. This should only take you 5 minutes if you know what you are doing with custom modules.

Step 1: Create Your Module Config File

Create this file: /app/code/local/YOURMODS/CmsTemplates/etc/config.xml and put the following code in, modifying it to suit your templates:

                    <label>Home Page</label>
                    <label>Category Listing</label>
                    <label>4 Column</label>

Step 2: Enable Your Module

Edit or create the following file: /app/etc/modules/YOURMODS_All.xml. Put the following code in that file:


Clear Magento’s cache if you don’t have caching turned off, and edit a CMS Page. You should now see your new templates listed in the Layout dropdown under the Custom Design tab.

This entry was posted in Magento. Bookmark the permalink.

12 Responses to Magento: Custom Page Templates in CMS Layout Dropdown

  1. emp says:

    Surely the best way I found to add custom templates in CMS layout!
    Thack you for the clear guidelines.

  2. Brad says:

    Nice tut…worked great. Thanks Josh.

  3. Mark says:

    Worked a treat, thanks Josh.

  4. Thank you for posting this tut, had no problems

  5. Josh Pratt says:


    Yes, there are definitely a whole bunch of ways to do the same thing. There are certainly better ways than others – but finding the better/best way can be difficult, especially for someone who isn’t a complete PHP pro (like me). Just keep trying things and don’t be afraid to experiment. Forums and IRC are great resources if you get stuck.

  6. Robert says:

    Hi Josh, thanks for your comment reply.

    Meanwhile, I’m figuring out what I can do with these XML layout files and phtml template and all the template functionality built into Magento. Maybe, the confusing thing is that you can do the same thing in many ways…

  7. Josh Pratt says:


    Well, you can certainly create a page template (and use it for the home page only) and call the CMS blocks right in the code (or from within the Home Page CMS content in the admin. You don’t have to do anything complicated to do that.

  8. Robert says:

    @Terry did you make sure that your directory is named TERRYMODS as well? also the XML file in /app/etc/modules must be TERRYMODS_All.xml…

    @josh Pratt thanks for this tutorial, quite useful. However, How would I go about creating a totally custom layout for the Home page. I’d like to keep the default layout in page.xml but I want to add another layout specific only to the home page where I specify some home page specific CMS blocks and code blocks in the left/right columns and above the footer… is there a chance you could write a tut about this? Thanks!

  9. Josh Pratt says:

    I’m assuming that the issue then was that you didn’t modify another occurance of “YOURMODS_CmsTemplates” maybe? I can’t be sure without having seen all of your code.

  10. Josh Pratt says:


    It’s difficult to know what to suggest when I can’t see your code. There are so many variables. Make sure to triple-check that everything is correct, and in the correct place. So, in other words – welcome to custom modules in Magento :)

    Just keep playing with it – try things. Put errors in the xml on purpose – make sure it’s reading the files.

  11. Terry says:

    Edit: I just tried this again but literally using YOURMODS_CmsTemplates instead of using TERRYMODS_cmstemplates, and it worked! If you know why, do tell!

  12. Terry says:

    Thanks for the tutorial. I just tried it but am not having any luck. The module shows up in System Config –> Advanced, but when I go to edit CMS Pages the list of templates does not display in the layout dropdown menu. Any suggestions?