Hiya,
Does anyone know if there is a way to create a logout link client side? Without having the user module on the page?
Why? Don't ask, last minute bespoke layout change from the client - grrrr
Try a cut'n'paste from the button that is inside the login panel and increment the id by 1. The login control must exists on the page though. Nasty, nasty hack.
That's the problem, the client wants to show different navigation (in different locations!) to different user roles.
At the moment I've got a protected override void OnLoad in the template that hides the placeholder (makes .Visible = false) with the standalone section that holds the user module.
I did try your suggestion first before I posted, personally not adverse to nasty hacks ;)
Guess the only way I can work this, is to extend the hack and hide the control with css.... Or tell the client no (hummm)
don't worry, said no to client
mayurThat's the problem, the client wants to show different navigation (in different locations!) to different user roles.
That part should be easy enough with page and section Authorization Role View allowed settings.
As far as the logout button goes, another possibility would be to duplicate the login module quickly to include just a logout button. (A logout button module! Sounds hilarious :) ) Or as you mentioned to hide the unwanted parts of the user control with css and jQuery.
Anyway, I suppose the solution you came up with is best :)