Fabio,
I require the following logout facility: `Logout` always appears as an option
on the left hand navigation bar (my website has a section then numerous
articles underneath it). All I need it to do is set an action HTTP param that
the model class with identify and run the logout function, then redirect to the
home page (where user presented with login screen).
I`ve achieved this by declaring a logout template that extends stkArticle which
then uses the below Freemarker template script. It works although the logout
page is briefly rendered before re-directed to the home page where the model
class logs out, then renders the home page with the login screen.
I suppose you could put your HTTP param read in the htmlHeader together with
the conditional redirect???
[code]
<div id="htmlHeader">
[#assign submitAction="../home.html"]
<meta http-equiv="Refresh" content="0;
url=${submitAction}?mssAction=mssLogout">
</div><!-- end htmlHeader -->
<div id="main" role="main">
[@cms.area name="breadcrumb" content=content/]
[@cms.area name="opener"/]
<h1>Logout.</h1>
<hr/>
<form method="post" action="../mss.html" autocomplete=""
name="logout_form" id="logout_form" >
If your browser doesn't automatically go there within a few
seconds, you may want to go to logout manually.
<input name="mssAction" type="hidden" value="mssLogout">
<button type="submit">Log Out</button>
</form>
[@cms.area name="content"/]
</div><!-- end main -->
[/code]
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=1a37f630-af17-44e1-8c01-f2ff7544691b
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------