/ Published in: eZ Publish
For redirect back to same place on logout, add this your site.ini.append.php:
[UserSettings]
RedirectOnLogoutWithLastAccessURI=enabled
[UserSettings]
RedirectOnLogoutWithLastAccessURI=enabled
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<form method="post" action={"/user/login/"|ezurl} class="styled"> {def $current_user = fetch( 'user', 'current_user' )} {if $current_user.is_logged_in} {else} <div class="block"> <input type="text" id="username" name="Login" /> </div> <div class="block"> <input type="password" id="password" name="Password" /> </div> <div class="block"> <button type="submit" name="LoginButton"> </button> </div> <input type="hidden" name="RedirectURI" value="{$node.url_alias}" /> {/if} </form>