2011-12-29 294 views
1

我正在使用Magento var-1.6Block not loading properly

我需要爲函數添加一個新模板(.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

我猜對了,你試圖替換模板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>