1列页面布局上的Magento客户帐户导航

时间:2014-04-04 10:04:03

标签: magento navigation account

我想将我的客户帐户页面设置为1列页面布局,然后将customer_account_navigation从左侧移动到内容顶部。关于如何轻松做到这一点的任何想法/方法?谢谢你们!

2 个答案:

答案 0 :(得分:8)

要移动导航菜单,您需要编辑主题的customer.xml布局文件 并在标记<customer_account>内移动此部分。

<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> 

从标记<reference name="left">内部移除{} <reference name="content">

另外,为了将模板从2columns-left更改为1column,请在同一标记<customer_account>内进行更改,以下内容:

<reference name="root">
    <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>

对此:

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

您可能需要在此之后进行一些css更改,以使导航菜单适合您的主题。

答案 1 :(得分:2)

打开app\design\frontend\YOUR_THEME_TEMPLATE\default\layout\customer.xml文件。customer_account更改

<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="setTemplate"><template>page/1column.phtml</template></action>
对于顶部的帐户链接请参阅: - Magento - How to add/remove links on my account navigation?

相关问题