Magento – Link display only when signed / is logged

PictureIt is surprisingly often the case, that was forgotten in a template to incorporate a logout link. If the customer is logged, he can not get out. Thus, one should enter a logout link, which is of course only appears, if the user is logged on.

If it's just a (or more) simple links is, to be exclusively displayed, If you are logged in, this can be done with a very simple code snippet, which is simply written to the appropriate file phtml.

Example header.phtml in the folder app / design / frontend / rwd / default / template / page / html

PictureHere I would like to have a logout link next to the account link - but only if you are logged.

To this end, I add

hinter

a.

Of course, the icon would have to be adjusted. This is just a copy of the account links with adaptation for use as logout link.

A contribution how to integrate a mini log-in area in the side, there here.

Used in Magento Version 1.9 Comments? Additions? Notes? Gladly!

Facebooktwitterredditpinterestlinkedinmailby feather
This entry was posted in General, Magento Design. Bookmark the permalink.

Leave a Reply

Your email address will not be published.