One way is to use the Menu.title .
In bootstrap/liftweb/Boot.scala you define a site map with page names:
class Boot { def boot { // ... def sitemap = SiteMap( Menu.i("Home") / "index", Menu.i("About") / "about") // ... } }
In templates-hidden/default.html you use the snippet:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift="http://liftweb.net/"> <head> ... <title class="lift:Menu.title">AppName:</title> ...
Then the page names will be: "AppName: Home" and "AppName: About". It is good if you use
<span class="lift:Menu.builder"></span>
to create a menu because the page names will be the same in the menu.
Another approach is to use head merge and define the title on the html page. To do this, you need to remove the <title> from templates-hidden/default.html and place the <head> or <head_merge> in your content block:
<!DOCTYPE html> <html> <body class="lift:content_id=main"> <div id="main" class="lift:surround?with=default;at=content"> <head_merge> <title>TITLE OF THIS PAGE HERE</title> </head_merge> ...
source share