2015-10-26 4 views
0

Я хочу переопределить шаблон индекса учетной записи пользователя, но когда я это сделаю, содержимое дублируется.Magento duplicate content block

Вот мой 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