2015-10-26 63 views
0

我想覆蓋用戶帳戶索引模板,但是當我這樣做時,內容被複制。Magento重複的內容塊

這裏是我的local.xml中

<customer_account_index> 
    <label>Customer My Account Dashboard</label> 
    <update handle="customer_account"/> 

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

    <remove name="left"/> 
    <remove name="breadcrumbs"/> 

    <reference name="my.account.wrapper"> 
     <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml"> 
      <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/> 
      <block type="customer/account_dashboard_info" name="child_account_dashboard_info" as="childinfo" template="customer/account/dashboard/mychild.phtml"/> 
     </block> 
    </reference> 
</customer_account_index> 

和我的基地custommer.xml

<customer_account translate="label"> 
    <label>Customer My Account (All Pages)</label> 
    <!--remove name="catalog.compare.sidebar"/> 
    <remove name="sale.reorder.sidebar"/--> 
    <!-- Mage_Customer --> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/2columns-left.phtml</template></action> 
    </reference> 

    <reference name="content"> 
     <block type="page/html_wrapper" name="my.account.wrapper" translate="label"> 
      <label>My Account Wrapper</label> 
      <action method="setElementClass"><value>my-account</value></action> 
     </block> 
    </reference> 

    <reference name="left"> 
     <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> 
      <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action> 
      <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action> 
      <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action> 
     </block> 
     <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml"> 
      <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action> 
      <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action> 
      <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action> 
     </block> 
     <block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/> 
     <remove name="tags_popular"/> 

    </reference> 
</customer_account> 

如果我使用的名稱= 「內容」,而不是名稱= 「my.account.wrapper」 來插入內容,它不會被複制。

回答

0

我發現我的問題: 在customer.xml已經有在customer_account_index手柄,所以我從我的local.xml中刪除它