Magento Page Layouts

Making a new page layout or template with Magento is kind of a tricky task. Magento comes standard with a 3column, 2column-right, 2coulmn-left, 1coulmn, and a empty layout but what if you wanted to create a 4column or maybe just create a custom template for your pages or even just certain pages. Well in order to do this you first need to understand how Magento works. First you have your .phtml files. These are basically your template files but to make these file do anything you have to get into the .xml files and tell them where to go. This is something that really no one can just tell you how to do it you actually have to either get into the filing system and experiment or buy a book. A good book to start with would be Magento User Guide.

Creating The Template File

In you are new to Magento then this will be kind of fun for you. First you need to create your .phtml file. In order to do that you need to navigate to your themes template pages folder. How to find that? Well if you are using the default Magento theme then you would first go to app -> frontend -> default -> default -> template -> page inside of there you will need to create you template file. So let say we want to create a 4coulmn template. You would just add a 4columns.phtml or whatever you would like to call it. Now you may be thinking you are all done. Nope if you go into your Magento Admin Panel or Dashboard and go under cms pages. You will see that you can not select your new template as a layout. Well this is because you need to first tell the Magento xml file to use the template.

Editing The XML

Lets locate those xml files. If you are still in the template -> page directory then all you have to do is go out one directory to layout. If you are not in the directory anymore you will have to navigate to app -> frountend -> default -> default -> layout. Inside this directory you are going to be looking for the page.xml file. Open it and navigate to the bottom. You should find some code like this

Now you need to add your page template to the end of the page.xml file. So you would do something like this.

Once you have added that you should be good to go. If you do not see the layout in the drop down in the cms page area, you may need to refresh your Magento cache. To do this go the Magento Admin Panel or Dashboard and go to System->Cache Management. Refresh all the cache. If that does not work then you need to go back and make sure you have named everything correct.

Nepal News Nepal news pookismahi made a real revolution in the industry. For additional local ELD visit utechcorp.

About Shane

Hi I am Shane the main author of this blog. I am a self taught web developer. I have been working in this industry since 2008. I work a lot with WordPress, Magento, SEO & SEM, and custom built websites. I love all sports and I will try anything at least twice.

Working remotely is one of the fastest growing perks in the working world. It’s something that people talk about a lot, and it’s a solution to the “work/life balance” problem that bothers so many people. Most of us have asked the question, “Why do I work so hard?” For some people, there are many sides

Know little about the use of keylogger for Android? Wondering why so many friends choose free Android spy? What benefits can you get from tracking cell phones of your children and employees with the help of sms tracker? Keep reading and find the answers in this short article. Have you ever dreamed of taking control

As a photographer whether it be a hobby or on a professional level the realm of high dynamic range photography can be very troublesome without photo editing software specifically made for photo HDR. Aurora HDR photography can be very challenging as it is, but with Aurora the job gets a little bit easier. Some might