当我登录时,有时我的"注销"链接会显示在顶部链接部分,有时不会。
似乎取决于特定的会话,即如果我关闭浏览器,稍后再回来,它可能就在那里。我知道很奇怪。
这段代码在我的customer.xml中,有时似乎可以使用。
<!--
Load this update on every page when customer is logged in
-->
<customer_logged_in>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
</reference>
</customer_logged_in>
<!--
Load this update on every page when customer is logged out
-->
<customer_logged_out>
<!---<reference name="right">
<block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
</reference>-->
<reference name="top.links">
<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>
</reference>
<remove name="reorder"></remove>
</customer_logged_out>
我想以后在加载链中可能会有什么东西覆盖它,但我找不到任何删除此链接的引用。
我还将这个确切的代码添加到了一个local.xml文件中,该文件应该最后加载。。没有运气。
有什么想法吗?我使用的是Magento 1.6.1社区。在我看来,这可能是一个错误,基于不稳定的行为模式。
我无法在这里发布这个片段,因为SO把它剥离得太多了,但这是你的答案。http://www.magentocommerce.com/boards/viewthread/52285/#t263743