When I’m logged in, sometimes my “Log Out” link shows in the top links section, sometimes not.
Seems to depend on the particular session, i.e. if I close my browser and come back later it might be there. Weird I know.
This code is in my customer.xml which appears to work sometimes.
<!--
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>
I figured something maybe overwriting it somehow later in the load chain, but I can’t find any references to remove this link.
I also added this exact code to a local.xml file which should get loaded last .. no luck there.
Any thoughts on what’s going on? I’m using Magento 1.6.1 community. It’s seems to me this could be a bug, based on the erratic behavior pattern.
I am unable to post the snippet here becuase SO strips it too much, but here is your answer.
http://www.magentocommerce.com/boards/viewthread/52285/#t263743