问题
I am currently using the latest version of Magento 1.7.0.2. After a customer logs on they are presented with the typical 2 column my account details with the navigation menu in the left hand position. I need to have this navigation deleted so that my dashboard page becomes only one column. I also don't want the empty space of the left navigation after it's deleted. I have tried the thing in local.xml but what happens is that the navigation menu in the customer my account is removed BUT also any page with a left sidebar loses that sidebar as well. Please not that I'm running a custom template and the only customer.xml file is in app/design/frontend/base/default/layout. My local.xml is in /app/design/frontend/default/custom_template/layout.
How would I be able to do this and what is the path for the files I need to edit. Any help is greatly appreciated. Here is the code for the customer my account layout in the customer.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/1column.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>
回答1:
As you want One column layout for Dashboard Page only, so Make your changes in
customer_account_index
Layout handle as this is for Customer account dashboard layout.
And if you will make your changes on customer_account
handle it will apply on all the customer pages if not updated on particular handle.
Hope this Help !!
来源:https://stackoverflow.com/questions/12890332/magento-set-customer-my-account-layout-to-one-column