扩展Magento模板中的默认布局
我正在尝试添加扩展默认布局的页面。我将内容放在.phtml文件中,然后按如下方式设置布局:扩展Magento模板中的默认布局,magento,magento-layout-xml,Magento,Magento Layout Xml,我正在尝试添加扩展默认布局的页面。我将内容放在.phtml文件中,然后按如下方式设置布局: <layout version="0.1.0"> <customlanding_index_index> <reference name="root"> <action method="setTemplate"><template>page/1column.phtml</template>
<layout version="0.1.0">
<customlanding_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<block name="content" as="content" type="core/text_list" template="quantumco/customlanding/landing_page.phtml" />
</customlanding_index_index>
</layout>
第/1页column.phtml
不幸的是,这一切给我的是我的布局没有内容。我假设我插入的内容块不正确,但我不知道如何使其工作。引用内容块并将自己的块作为子块添加:
<layout version="0.1.0">
<customlanding_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="landing_page" template="quantumco/customlanding/landing_page.phtml" />
</reference>
</customlanding_index_index>
</layout>
第/1页column.phtml
如果您的块属于特定类型(我认为这不是基于您提供的代码示例),则用自定义块类型替换
core/template
。引用内容块并将您自己的块作为子块添加:
<layout version="0.1.0">
<customlanding_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="landing_page" template="quantumco/customlanding/landing_page.phtml" />
</reference>
</customlanding_index_index>
</layout>
第/1页column.phtml
如果您的块属于特定类型(我不认为这是基于您提供的代码示例),则使用自定义块类型替换core/template