Howdy,
A Snippet is the bridge between the view and Scala code.  In this example:

<lift:surround with="default" at="content">
  <h2>Welcome to your project!</h2>
  <p><lift:HelloWorld.howdy /></p>
</lift:surround>

The <lift:HelloWorld.howdy /> tag refers to the HelloWorld snippet which is
is some Scala code in the HelloWorld class.

Note the <lift:surround> tag.  This surrounds its body with a template
called "default".  The default.html file is located in the templates-hidden
directory (it can be located elsewhere, but that's the convention).  It has
all the "stuff" in it like <head> and style and menus.  This makes it
possible to change the look of a large part of your site by changing the
template rather than each page.

Thanks,

David

On Fri, Mar 13, 2009 at 4:30 AM, mal3 <[email protected]> wrote:

>
> Why does HelloWorld index.html contain a snippet rather than a
> complete XHTML page?
>
> When I first saw the HelloWorld example I thought there must be a
> mistake,
> because the index.html file contains a snippet, while default.html
> contains
> what looked more like a complete XHTML page.
>
> Why doesn't lift initially reference a complete XHTML page and then
> pull in the snippet(s)?
>
> Is it to make it difficult/impossible for logic to creep into the
> view?
>
> Mal.
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to