All pages require user to be logged in and it works perfectly with Lift, however, the login page is displayed within the "default" template at content panel. I would like the login form to be displayed at the separate page, using different template (let's say "login-tmp"), so that there is just the login form displayed in a centered panel and nothing else, no header, no menu panel, just plain login form. I tried to override MetaMegaProtoUser's loginXhtml method, but it didn't allow me to put there <lift:surround with="login_tmp" at="content">. Is it possible to somehow separate the login form from the "default" template?
Also I'm wondering, is it possible, that user logs in using a nickname (or login name) instead of an email?
Thanks
Rusho
Hi everybody,
I have a small site running on Lift using MegaProtoUser for user management. I included User.menus into my sitemap and everything runs perfectly fine. My page consists of a header containing a logo, narrow left panel with menu and wide right panel for a content. All is done through "default" template using <lift:surround>
All pages require user to be logged in and it works perfectly with Lift, however, the login page is displayed within the "default" template at content panel. I would like the login form to be displayed at the separate page, using different template (let's say "login-tmp"), so that there is just the login form displayed in a centered panel and nothing else, no header, no menu panel, just plain login form.
I tried to override MetaMegaProtoUser's loginXhtml method, but it didn't allow me to put there <lift:surround with="login_tmp" at="content">. Is it possible to somehow separate the login form from the "default" template?
Also I'm wondering, is it possible, that user logs in using a nickname (or login name) instead of an email?
Thanks
Rusho
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Thanks David,overriding loginMenuLocParams managed to display my own login template (though I don't know why it didn't allow me to use S.??("already.logged.in"),
complaining that () => LiftResponse is required). However, I might have missed how to specify a login form in such template, because though I do have there a form with action set to "/user_mgt/login" and fields with names such as "username" and "password", the actual login doesn't work and it displays login form again
Hi David,I know that S ?? "already.logged.in" returns a String, however, I found in ProtoUser.scala definition:/*** The LocParams for the menu item for login.* Overwrite in order to add custom LocParams. Attention: Not calling super will change the default behavior!*/protected def loginMenuLocParams: List[LocParam[Unit]] =If(notLoggedIn_? _, S.??("already.logged.in")) ::Template(() => wrapIt(login)) ::NilThat's why I was suprised, that I couldn't us it same way in the overriden method.