I want to create a menu that looks like:
HOME | FOO | BAR | ABOUT | CONTACT
How might I go about doing this?
Here is what I have tried:
&
There might be a cleaner way to do this. Once you've declared the urls in your sitemap, you can pretty much use them as regular links in your template. You would write them as pure html.
In Boot.scala:
val menus = List(
Menu(Loc("home", List("index"), "Home")),
Menu(Loc("foo", List("foo"), "Foo")),
Menu(Loc("bar", List("bar"), "Bar")),
Menu(Loc("about", List("about"), "About")),
Menu(Loc("contact", List("contact"), "Contact"))
)
LiftRules.setSiteMap(SiteMap(menus: _*))
In your template, e.g. index.html:
Or as said Debilski, you can also call each menu item by their name. It would be more Lift-iesc.
You can then add any style you want in an external stylesheet file or inside the page.