开发者

Unsure of how the default menu in LiftWeb is put together

I'm taking a lo开发者_开发知识库ok at how Menu.Builder is pulled together using Boot.scala and there's one thing that confuses me. I do see the option to login/register however it doesn't show up as one of the items on the sitemap. Where does that actually come from...my confusion may come from not much java experience at all...lift I'm starting to get a feel for but I'm just not seeing where those particular items get thrown into the menu its self.

In the end basically I was looking to just toy around and rearrange default.html just to see what's what at the moment.


I don't know which Lift version you are using, but using an archetype from the latest snapshot version provides this in the Boot.scala file:


// Build SiteMap
    def sitemap() = SiteMap(
      Menu("Home") / "index" :: // Simple menu form
      // Menu with special Link
      Menu(Loc("Static", Link(List("static"), true, "/static/index"), 
           "Static Content")) ::
      // Menu entries for the User management stuff
      User.sitemap :_*)

Where the user is an object that extends Lift's MegaProtoUser, which takes care of defining a basic user account. It also has a method to generate SiteMap menu's for all user management pages, which is used in the Boot class, as is done in the above snippet.


Ok, this post is giving me the info I needed... http://groups.google.com/group/liftweb/browse_thread/thread/e0619231a8ec5cab/f771314fcfad439a?lnk=gst&q=MegaProtoUser#f771314fcfad439a

Taking a look at the framework now and starting on my auth system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜