Magento注销按钮在订单跟踪页面上消失
顶部的登录/注销链接。除了Magento的标准订单跟踪页面外,所有链接都会显示。我已经用默认值替换了customer.xml,但它并没有解决这个问题。登录和注销链接都不会显示在该页面上。所有其他链接都显示良好。我无法找到解决此问题的方法。有人吗Magento注销按钮在订单跟踪页面上消失,magento,layout,magento-1.7,Magento,Layout,Magento 1.7,顶部的登录/注销链接。除了Magento的标准订单跟踪页面外,所有链接都会显示。我已经用默认值替换了customer.xml,但它并没有解决这个问题。登录和注销链接都不会显示在该页面上。所有其他链接都显示良好。我无法找到解决此问题的方法。有人吗 谢谢在您的自定义设置中很困难,所以我只想让您找到正确的方向: 获取当前布局句柄,可能需要将此行添加到控制器或任何活动代码段中,以获取页面的活动句柄: Zend_Debug::dump(Mage::app()->getLayout()->get
谢谢在您的自定义设置中很困难,所以我只想让您找到正确的方向: 获取当前布局句柄,可能需要将此行添加到控制器或任何活动代码段中,以获取页面的活动句柄:
Zend_Debug::dump(Mage::app()->getLayout()->getUpdate()->getHandles());
检查布局xml文件中的每个活动布局句柄,可能会删除链接
如果它没有被删除,它可能根本就没有被添加
通过布局xml文件删除的方法:
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="customer/getLoginUrl" />
</action>
</reference>
<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>
通过布局xml文件添加的方式:
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="customer/getLoginUrl" />
</action>
</reference>
<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>
登录
登录
100
希望这有帮助 谢谢你的快速回答。在任何xml文件中都找不到removeLinkByUrl!所以它没有被移除。我知道它被添加到customer.xml中的block top.links下,还有其他的方法吗?你调试过活动的布局句柄吗。。。要检查链接是否添加到正确的句柄中?它位于customer_logged_in和customer_logged_out句柄中,因此无论客户是否登录,它都应显示在所有页面中。是的,我调试过。