Menu(Loc("addBk2", List("edit_book"), "Edit book 2", Hidden,
IfLoggedIn)) ::  // Doesn't work
Hidden and ifLoggedIn are LocParam, I guess switch them and you could
get you want.
change to:
Menu(Loc("addBk2", List("edit_book"), "Edit book 2", IfLoggedIn,
Hidden)) ::


On Oct 30, 9:40 am, "Neil.Lv" <[email protected]> wrote:
> Hi all,
>
>    I have a question about the Loc , and How to hidden the Menu if the
> user is not a superuser ?
>
>    The code is :
>      The Edit book 1 always shows in the home page if the user doesn't
> login.
>      The Edit book 2 doesn't work both login in or not .
> ###
>   val IfLoggedIn = If(() => User.currentUser.isDefined, "You must be
> logged in")
>
>   ...
>   Menu(Loc("Home", List("index"), "Home")) ::
>   Menu(Loc("addBook", Link(List("edit_book"), false, "/book/
> edit_book"), "Edit book 1")) ::   //
>   Menu(Loc("addBk2", List("edit_book"), "Edit book 2", Hidden,
> IfLoggedIn)) ::  // Doesn't work
>   User.sitemap
> ###
>
>    Thanks for any help!
>
> Cheers,
>   Neil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to