阻止无法正确加载

时间:2011-12-29 11:35:59

标签: magento

我正在使用Magento var-1.6

我需要将新模板(.html)文件添加到函数中。我在XML中添加了一个块,但页面显示了两次加载的模板。

这是我在customer.xml中添加的代码

<customer_account_customeraccount translate="label">
    <label>Customer Account Page</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="core/template" name="customer_account_page" template="persistent/customer_account.phtml" />
    </reference>
</customer_account_customeraccount>

有人能找到问题吗?

1 个答案:

答案 0 :(得分:1)

我是否正确地猜测您正在尝试替换块customer_account_page的模板?

在这种情况下,您应该能够:

<customer_account_customeraccount translate="label">
    <label>Customer Account Page</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="customer_account_page">
        <action method="setTemplate"><template>persistent/customer_account.phtml</template></action>
    </reference>
</customer_account_customeraccount>