I've been playing around with this and extending the template loader is actually pretty easy. Its much simpler than I thought it would be!
I have a dilemma however - store the templates (and associated meta data) in the database and then have to do a fetch / read on every request, or, use the file system and hold (for instance): example.html and example.meta // java properties file format The tree structure of the file system is the path of least resistance for my particular use case i think, but i guess im after some input / advice...? I feel as either way has a couple of hang-ups! The kind of meta data is just simple key-value pair stuff, but my plan would be to extend Record so that the save() etc became transparent and was abstracted away (i.e. don't need to worry about InputStreams etc) Appreciate any input / advice people have Cheers Tim On Nov 29, 2:31 pm, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote: > Looking at findVisibleTemplate in LiftSession (line 512) certainly makes it > appear that the template table defined by addTemplateBefore/After is > consulted before it checks the filesystem. > > Derek > > On Fri, Nov 28, 2008 at 10:26 AM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > > Hey guys, > > > I want to user lifts LiftRules.addTemplateBefore/After to load > > templates from a database, where my persistence is JPA. > > > With TemplatePf can I do this? Im also thinking this will be one of > > the nice things about having lift tags, as it will mean i shouldn't > > need to build a custom tagging language or anything (as we already > > have it!). I presume that TemplatePf just tells lift where to get the > > XHTML from then it continues to do the processing on it (process > > snippets etc)? > > > Cheers > > > Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
