为了布局的原因,我需要两个不同的header.phtml(header.phtml/header1.phtml)。但是,如果我现在复制page.xml中的头部块,则只有最新块的定义似乎工作(它们都独立工作,但是当两个块位于page.xml中时,只有最新的两个块导致更改) 。Magento 1.7 page.xml多次使用块元素
<block type="page/html_header" name="header" as="header">
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/html_wrapper" name="top.bar" as="topBar" translate="label">
<label>Breadcrumbs</label>
<action method="setElementClass"><value>top-bar</value></action>
</block>
</block>
<block type="page/html_header1" name="header1" as="header1">
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="page/html_wrapper" name="top.bar" as="topBar" translate="label">
<label>Breadcrumbs</label>
<action method="setElementClass"><value>top-bar</value></action>
</block>
</block>
有人可以告诉我,我的错误在哪里?
你在Page/html /中有一个文件header1.phtml吗? – Rounder 2013-02-20 19:10:09
另外你想要做什么需要2个头? .. – Rounder 2013-02-20 19:25:30
在什么条件下你想使用一个模板与另一个? – benmarks 2013-02-20 20:06:35