The Login link doesn't change to Logout - can it do this?
In many of our predesigned templates, there is a Login link in the header links, along with My Account, View Cart, and Checkout.
By default, this link is static and doesn't change to "Logout" when you are logged in. However, you can add in a token to achieve this functionality.
To do this:
- In your admin panel, hover over the Design tab and click on Advanced Options
- Open up header.html
- Look for the DIV called header-links
- Within this DIV are four links, and "Login" is the first one. You will want to replace the "Login" text with the token ##CUSTOMER_LOGIN_LOGOUT_LINK##, like this:
- Publish the file, and then do the same thing with secure.header.html
This token works with multiple languages, so if you translate "Login" and "Logout," they will show as translated on the storefront when you switch languages.