相关疑难解决方法(0)

Magento我的帐户布局XML问题

我遇到问题,让customer.xml布局文件在客户的"我的帐户"页面上正常工作.

导航链接和通常位于页面左侧的先前订购的项目将不会显示在页面上,但如果我将参考名称更改为xml文件中的"content",则会显示(除了它之外)显然然后在右边).我已经检查了它引用的模板(2columns-left.phtml),并且getChildHtml('left')位于正确的位置.

导致问题的块:

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

    <reference name="left">
        <action method="unsetChild"><name>catalog.navigation.all</name></action>
        <action method="unsetChild"><name>callout.sendcard</name></action>
        <action method="unsetChild"><name>callout.specialorder</name></action>
        <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="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
        <remove name="tags_popular"/>
    </reference>
</customer_account>
Run Code Online (Sandbox Code Playgroud)

这基本上是从我们的另一个网站直接复制,这是100%的工作.我已经尝试了我能想到的一切(例如,在模板和布局xml中更改引用的名称)无济于事.布局引用的模板显然有效,因为它们在放入"内容"区域时会显示出来.

magento的安装版本为1.3.1.1.

我感谢您给我的任何建议......

更新:我尝试将引用更改为"global_messages",它也没有显示.它似乎只适用于"内容"部分.

更新2:这些是在使用Alan Storm非常方便的调试模块时在页面上使用"showLayout = page"查询字符串的结果(您可以在下面的答案中找到).

    <?xml version="1.0"?>
<layout><block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
    <block type="page/html_head" name="head" as="head">
        <action method="addJs">
            <script>prototype/prototype.js</script>
        </action>
        <action method="addJs">
            <script>prototype/validation.js</script>
        </action>

        <action method="addJs">
            <script>paypoint/validation.js</script> …
Run Code Online (Sandbox Code Playgroud)

php xml layout magento

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

layout ×1

magento ×1

php ×1

xml ×1