jaga
Junior Member
Posts: 53
|
Post by jaga on Dec 27, 2011 4:22:12 GMT -8
How to create a new layout in magento
Many times we need to add new layout skeleton rather then 2colums-left, 2columns-right, 1column and 3columns. Here is the way how we can add more layout structures.
You can make modification directly in app/code/core/Page/etc/config.xml but if you don’t want to touch core file, I recommend you to follow these steps:
Create config.xml under app/code/local/Magestore/Page/etc
<?xml version="1.0" encoding="utf-8"?> <config> <modules> <Magestore_Page> <version>0.1.0</version> </Magestore_Page> </modules> <global> <page> <layouts> <three_columns_cms module="page" translate="label"> <label>3 columns for cms page</label> <template>page/3columns-cms.phtml</template> <layout_handle>page_three_columns_cms</layout_handle> </three_columns_cms> </layouts> </page> </global> </config>
Now, open app/etc/modules and create file Magestore_Page.xml
<?xml version="1.0"?> <config> <modules> <Magestore_Page> <active>true</active> <codePool>local</codePool> </Magestore_Page> </modules> </config>
You have to create a file named '3columns-cms.phtml' under app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/template/page.
Now, log in your admin, go to Cms -> Manage pages, click Add new page. In Custom Design tab, you can find new layout you just created
|
|