Magento将客户我的帐户布局设置为一列 [英] Magento set customer my account layout to one column

查看:77
本文介绍了Magento将客户我的帐户布局设置为一列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用最新版本的Magento 1.7.0.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆