How to add a new page in Lift framework

心已入冬 提交于 2019-12-05 20:14:18

It's been a long time since I've done anything with Lift, but from what I remember, the easiest way may be to add the page in the menu entries in the bootstrap.liftweb.Boot.scala class. If you've setup your project using one of Lift's maven archetypes, this class should be there in your project. In this class, there's the following line (or something resembling it, the example I got still uses Lift 1.0, currently I believe they are already heading towards a 2.0 release):


// Build SiteMap
val entries = Menu(Loc("Home", List("index"), "Home")) :: Nil

If you change that line to the following:


val entries = Menu(Loc("Home", List("index"), "Home")) :: Menu(Loc("Welcome", List("welcome"), "Welcome")) :: Nil

than you can acess your welcome page directly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!