Lift Web Framework

Lift supports surrounding a given section of a page with a template from another file. This allows you to have master page templates or even section templates that are accessed by many different pages.

<lift:surround with="default" at="content">
  This is a simple page surrounded by the default template.
</lift:surround>

Using the <lift:surround> tag, you can surround the body with the contents of another template. The "with" attribute designates the name of the template. By convension, templates are stored in the /templates-hidden directory. Lift will not serve direct HTTP request from any directory that contains "-hidden". The "at" attribute specifies where the content should be placed in the loaded template. Lift will look for a <lift:bind name="..."/> tag in the target template and insert the body of the surround tag at the bind point.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift='http://liftweb.net'>
  <head>
    <title>Lift Web Framework: <lift:Menu.title /></title>
    
    <lift:CSS.blueprint />
    <lift:CSS.fancyType />
    <script id="jquery" src="/classpath/jquery.js" type="text/javascript"/>
    <script id="json" src="/classpath/json.js" type="text/javascript"/>
  </head>
  <body>
    <div class="menu">
      <lift:menu.builder/>
    </div>
    <div class="messages">
      <lift:Msgs />
    </div>
    
    <div class="contents">
      <lift:bind name="content" />
    </div>
  </body>
</html>

Lift is Copyright 2007-2010 WorldWide Conferencing, LLC. Distributed under an Apache 2.0 License.
Lift version 2.3 built on Tue Apr 05 13:24:00 PDT 2011.
Stats: Total Memory: 517,603,328 Free Memory: 464,579,560 Open Sessions: 123
Updated At: Sat Feb 04 11:12:54 PST 2012 Started At: Thu Jul 07 11:17:57 PDT 2011