25
2010
How to create your own layouts for pages in Magento
To create a page template in Magento we must follow the following steps:
1. Copy the file app / code / core / Mage / Page / etc / config.xml app / code / local / Mage / Page / etc / config.xml.
Creating this file make sure not to lose the changes if you upgrade Magento.
2. Create a file called Mage_Local.xml in app / etc / modules. Therein add the following:
?> <? Xml version = "1.0"?> <config> <modules> <Mage_Page> <Active> true </ active> <codePool> local </ codePool> <depends> <Mage_Core /> </ Depends> </ Mage_Page> </ Modules> </ Config>
3.-We create our new template from any existing app / design / frontend / XXX / XXX / template / page. For example, we can take 3columns.phtml file, make a copy in the same folder and rename it to 4columns.phtml.
4.-Go back to the config.xml file created in step 1, and then add our new template:
translate = "label" > module = "page" <four_columns "label" translate => <label> 4 columns </ label> <template> page/4columns.phtml </ template> <layout_handle> page_four_columns </ layout_handle> </ Four_columns>
5.-Once all the above steps, we should see the new template when creating a page in CMS> Pages. Otherwise we must erase the contents of the var / cache our Magento directory, either by hand or through the terminal:
rm-rf * (still within the directory var / cache)

Leave a comment
Categories
- Short (12)
- Money (9)
- Economy (1)
- Gadgetosección (22)
- General (50)
- Musi-k (43)
- Nosoloinformatica (148)
- News (65)
- Opinion (4)
- Television & film (25)
- Travel (19)
- Videos (105)
Pages
- No public Twitter messages.
Tags
Comments
admin on The 4 devalued currencies of the world
EL0Y on the 4 currencies devalued the world
admin on The 4 devalued currencies of the world
EL0Y on the 4 currencies devalued the world
admin on Micronations unrecognized

































