Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi,

I would like to place a Logout-Link on my page(s), but I don't know the correct URL.
I have tried using an a-Tag with the following href:
Code: Select all
<a href="MYDOMAIN/couch/login.php?act=logout">Logout</a>

But this does not work due to missing token.
How can users logout then?

Thanks a lot,
Regards,
Jan
Hi and welcome :)

Couch provides 'k_logout_link' and 'k_login_link' variables for creating logout/login links.
You can modify the following snippet that shows either of the two depending on the login status of the user -
Code: Select all
<cms:if k_logged_in>
   Logout <a href="<cms:show k_logout_link />"><cms:show k_user_title /></a>
<cms:else />
   <a href="<cms:show k_login_link />">Login</a>
</cms:if>

Hope this helps.
Great, thank you! :D

Regards,
Jan
3 posts Page 1 of 1