public
Created

twitter nav menu definition

  • Download Gist
gistfile1.scala
Scala
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
def userLinkText = User.currentUser.map(_.shortName).openOr("not logged in").toString
 
val entries = List(Menu("Home") / "index" >> LocGroup("main"),
Menu("Page 1") / "page1" >> LocGroup("main"),
Menu("Page 2") / "page2" >> LocGroup("main"),
Menu("Page 3") / "page3" >> LocGroup("main") >> PlaceHolder submenus (
Menu("Page 3a") / "page3a" ,
Menu("Page 3b") / "page3b" ,
Menu("Page 3c") / "page3c") ,
User.loginMenuLoc.open_!,
User.createUserMenuLoc.open_!,
Menu("user",userLinkText) / "#" >>
MustBeLoggedIn >> LocGroup("user") >> PlaceHolder submenus (
User.logoutMenuLoc.open_!,
User.editUserMenuLoc.open_!,
User.changePasswordMenuLoc.open_!
)
)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.