> If you want to display the contents of your 404.html, checkout 
> NodeResponse... just load up your template using the template helpers (this 
> will give you NodeSeq) and then you can present that back to the user. Job 
> done.

I am familiar with NodeResponse and its subclasses.  I've used them in
our REST api.  But, what I can't figure out, is how to use them in
conjuction with the templating engine as you seem to be alluding to
(with the template helpers).

Can you point me in the right direction? I am going to try switching
to M8 and then using S.render like this:

    val node404 = <lift:surround with="default" at="content">
      <h1>Not Found</h1>
    </lift:surround>

    LiftRules.uriNotFound.prepend {
      case (req, _) => XhtmlResponse(S.render(node404, req), _,
headers, cookies, 404, false)
    }



>
> Cheers, Tim
>
> On 29 Dec 2009, at 15:23, Alex Black wrote:
>
> > But of course RewriteResponse is not a LiftResponse.  Whats the best
> > way to do this?  Basically I've got a template called 404.html which
> > I'd like to display whenever there is a 404.
>
> > I Just thought of something, perhaps I could add a RewriteRule that
> > matches everything?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to