Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

creating a login/out link


Reply


2 Posts   444 Views

Avatar
wake2010

Community Member, 9 Posts

11 January 2012 at 2:40pm

how do i add a login/out link on the front end of the site?

i would like it so that when a user is not logged in it shows log in and when they are dynamicly says log out

any ideas?

thanks

Avatar
Sticks

Community Member, 31 Posts

11 January 2012 at 4:04pm

Edited: 11/01/2012 4:05pm

In your Page.ss (or other .ss template file) you can use something like this:

<% if CurrentMember %>
<a href="/Security/logout">Log out</a>
<% else %>
<a href="/Security/login">Log in</a>
<% end_if %>