Magento目录页设置布局及添加新布局的方法 15 July 2011 10:21 Friday by 小屋 分享收藏

标签: magento 布局

Magento目录页设置布局

在catalog.xml的<default>里添加

<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="setIsHandle"><applied>1</applied></action>
</reference>

就把Magento的目录布局从3列设成带左侧的两列了。

Magento添加新布局 方法:

在app/code/core/Mage/Page/etc/config.xml这个文件里的<global><page><layouts>里面添加

<new_columns module="page" translate="label">
<label>new column</label>
<template>page/new.phtml</template>
<layout_handle>page_new_columns</layout_handle>
</new_columns>

在后台选择布局的时候就多了new column这个选项。或者通过上面代码选择这个新布局。

作者: Sjolzy

--EOF--

引用地址:

发表评论:

  给 “Magento目录页设置布局及添加新布局的方法” 评分

广告、无意义的评论必删!