【发布时间】:2013-06-07 06:50:44
【问题描述】:
top.links 中的登录/注销链接显示在任何地方,除了 Magento 的标准订单跟踪页面。我已经用默认值替换了 customer.xml,但它不能解决问题。登录和注销链接都不会显示在该页面上。所有其他链接都显示正常。我无法找到解决此问题的方法。有人吗?
谢谢
【问题讨论】:
标签: magento layout magento-1.7
top.links 中的登录/注销链接显示在任何地方,除了 Magento 的标准订单跟踪页面。我已经用默认值替换了 customer.xml,但它不能解决问题。登录和注销链接都不会显示在该页面上。所有其他链接都显示正常。我无法找到解决此问题的方法。有人吗?
谢谢
【问题讨论】:
标签: magento layout magento-1.7
在您的自定义设置中很困难,所以我只是试图让您朝着正确的方向前进:
获取您当前的布局句柄,也许您将这一行添加到控制器或任何活动代码中,以获取您页面的活动句柄:
Zend_Debug::dump(Mage::app()->getLayout()->getUpdate()->getHandles());
检查布局xml文件中的每个活动布局句柄,也许链接被删除 如果它没有被删除,它可能根本没有被添加。
通过 layout-xml-file 移除的方法:
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="customer/getLoginUrl" />
</action>
</reference>
通过layout-xml-file添加方式:
<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>
</action>
希望这会有所帮助!
【讨论】: