【发布时间】:2012-03-17 09:51:45
【问题描述】:
我为我的主页制作了一个自定义模板。我创建了以下文件:
1.app/etc/modules/Test_Layout.xml
<?xml version="1.0"?>
<config>
<modules>
<Test_Layout>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Page />
</depends>
</Test_Layout>
</modules>
</config>
2。 app/code/local/Test/Layout/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Test_Layout>
<version>0.1.0</version>
</Test_Layout>
</modules>
<global>
<page>
<layouts>
<test_layout translate="label">
<label>Test Layout</label>
<template>page/home.phtml</template>
<layout_handle>page_home</layout_handle>
</test_layout>
</layouts>
</page>
</global>
</config>
3。 app/etc/modules/Mage-All.xml 并在那里添加我的模块。
4.这些东西之后,我的新模块在sys->config->advanced->advanced的列表中,
5.然后我设置CMS->Pages->Design->Custom Layout->Test Layout & Custom Theme->defualt/test(结果出现在drop-下列表。)
6.除了这些,我还设置了自定义布局/page.xml:
<block type="page/html" name="root" output="toHtml" template="page/home.phtml">
(我不确定类型)
结果:Magento 使用我的自定义 page.xml,但它不使用我的自定义模板“template/home.phtml”并使用其默认模板。
你能帮帮我吗?--Thx
【问题讨论】:
标签: magento