我正在尝试将Magento中我的帐户页面的2列布局转换为1列布局。我不需要左栏上的导航链接。我使用的是Magento 1.9.0.1,编程经验非常有限。
主题开发人员告诉我,我需要自定义local.xml文件。
我还在此网站上找到了另一个帖子 - Magento set customer my account layout to one column,这表明我应该查看<customer_account>
句柄。
是否有人能够告诉我需要对此文件进行哪些更改?以下是我认为是local.xml文件的相关部分。
谢谢!
<customer_account>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
<action method="unsetChild"><name>cart_sidebar</name></action>
<action method="unsetChild"><name>reorder</name></action>
</reference>
</customer_account>
<customer_logged_in>
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLogoutUrl"/></action>
<action method="addLink" translate="label title" module="customer">
<label>Log Out</label>
<url helper="customer/getLogoutUrl"/>
<title>Log Out</title>
<prepare/>
<urlParams/>
<position>100</position>
<liParams/>
<aParams>class="top-link-logout"</aParams>
</action>
</reference>
<reference name="left">
<block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
</reference>
</customer_logged_in>
<customer_logged_out>
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
<action method="addLink" translate="label title" module="customer">
<label>Log In</label>
<url helper="customer/getLoginUrl"/>
<title>Log In</title>
<prepare/>
<urlParams/>
<position>100</position>
<liParams/>
<aParams>class="top-link-login"</aParams>
</action>
</reference>
</customer_logged_out>
<customer_account_edit translate="label">
<reference name="left">
<action method="unsetChild"><name>cart_sidebar</name></action>
</reference>
</customer_account_edit>
答案 0 :(得分:1)
按如下所示更新local.xml文件。
<customer_account_index translate="label">
<label>Customer My Account Dashboard</label>
<update handle="customer_account"/>
<!-- Mage_Customer -->
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
<reference name="my.account.wrapper">
<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
<block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
<block type="core/template" name="customer_account_dashboard_top" as="top" />
<block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
<block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
<block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/></block>
</reference>
</customer_account_index>
改变是
<action method="setTemplate"><template>page/1column.phtml</template></action>