Hello,
In the bottom off my website trying add a 'login' OR 'logout' link:
<@ if @{ ?context=edit_page } @> <a href="/dashboard?context=logout>Logout</a> <@ else @> <a href="/dashboard>Login</a> <@ end @>
But this doens't work. How can i solve that?
Update: Trying also the statement 'with' instead 'if':
<@ with "/context=edit_page" @> ...
Doesn't work!
ctuxboy
Hi,
you can check the user name. That's only possible with a little bit of PHP:
<@ set { ":user": "<?php echo \Automad\GUI\User::get(); ?>"} @> <@ if @{ :user } @> <a href="/dashboard?context=logout">Log out</a> <@ else @> <a href="/dashboard">Log in</a> <@ end @>
?
Hi mad,
Thanks man!
This works perfectly ?