Hi Gregory,

Fortunately I already knew that bit.

It turns out that the problem was that the template store in my splice function 
did not contain the loaded templates. I'm not sure why.

If I just do something like:

ts <- getTS

in a splice function called by renderTemplate, the templates I loaded and 
passed to renderTemplate do not seem to be there.

So instead I keep a template store variable in MyMonad and use that instead.

Now everything works as expected.

Cheers,
Kevin

--- On Wed, 6/23/10, Gregory Collins <[email protected]> wrote:

> From: Gregory Collins <[email protected]>
> Subject: Re: [Snap Framework] renderTemplate with XML fragments in Heist
> To: "Kevin Jardine" <[email protected]>
> Cc: [email protected]
> Date: Wednesday, June 23, 2010, 12:00 AM
> Kevin Jardine <[email protected]>
> writes:
> 
> > My error I think - I was assuming that loadTemplates
> loads template
> > directories recursively like StringTemplate, but in
> fact it appears
> > that it only loads templates in the given directory,
> correct?
> 
> They load recursively but if a template is in "foo/bar.tpl"
> you have to
> address it as "foo/bar".
> 
> G
> -- 
> Gregory Collins <[email protected]>
> 


      
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to