It doesn't work too.

  I use this code and the false maybe doesn't work yet, it always
shows on the home page.

  If i don't add this loc in the menu, the link doesn't work and shows
"Internet Explorer cannot display the webpage"
    link -> http://localhost:8080/book/edit_book?F786969850119TJ4=_
###
Menu(Loc("addBk2", Link(List("edit_book"), false, "/book/edit_book"),
"Edit book")) ::
###

Cheers,
  Neil


On Oct 30, 10:32 am, Xuefeng Wu <[email protected]> wrote:
> 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