Magento 将客户我的帐户布局设置为一列 [英] Magento set customer my account layout to one column
问题描述
我目前使用的是最新版本的 Magento 1.7.0.2.客户登录后,他们会看到典型的 2 列我的帐户详细信息,导航菜单位于左侧位置.我需要删除此导航,以便我的仪表板页面仅成为一列.我也不想要左侧导航删除后的空白区域.我已经在 local.xml 中尝试过这个东西,但发生的情况是客户中我的帐户中的导航菜单被删除,但任何带有左侧边栏的页面也会丢失该侧边栏.请注意,我正在运行自定义模板,而唯一的 customer.xml 文件位于 app/design/frontend/base/default/layout 中.我的 local.xml 在/app/design/frontend/default/custom_template/layout 中.
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.
我如何才能做到这一点以及我需要编辑的文件的路径是什么.任何帮助是极大的赞赏.这是customer.xml中客户我的帐户布局的代码
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>
推荐答案
如你所愿 仪表盘页面只有一列布局,所以在customer_account_index
布局句柄,因为这是用于客户帐户仪表板布局.
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.
如果您将在 customer_account
句柄上进行更改,如果未在特定句柄上更新,它将应用于所有客户页面.
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.
希望对您有所帮助!!
这篇关于Magento 将客户我的帐户布局设置为一列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!