Re: How do I reference functions from another template?
"R. Tyler Ballance" <[email protected]>
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
Everybody panic! ;) I said we had *talked* about *trying* to phase it out, I didn't sa we were or were not, thus my followup question about how folks are using #include (topposting from my phone :-!) -----Original Message----- From: Jean-Baptiste Quenot <[email protected]> Sent: Thursday, May 07, 2009 2:29 To: [email protected] Subject: Re: [Cheetahtemplate-discuss] How do I reference functions from another template? 2009/5/5 R. Tyler Ballance <[email protected]>: > On Mon, May 04, 2009 at 09:34:03PM -0400, Saul Jaspan wrote: >> Lets say I have a template, dir1/dir2/dir3/foo.tmpl: >> >> #def FooFunct($param1, $param2): >> Stuff here >> #end def >> >> and another template where I want to call FooFunct, dir1/base.tmpl: >> >> #include "dir1/dir2/dir3/foo.tmpl" >> #* Want to call $FooFunct("1", "2") *# > > > Tavis and I have talked about starting to try to phase out the "#include" > statement so I wouldn't exactly recommend it if you can avoid it. Interesting, we use #include everywhere so that the template writers can write their templates without having to compile them by hand. How would I automatically compile referenced templates? Do you remember my patch about not checking the last modification date of included files? I only use it in production to avoid stat() system calls, but in development it's very handy! Anyway if you drop support for #include I think I'll have to stay with the current version, which is fine for me. -- Jean-Baptiste Quenot http://jbq.caraldi.com/ ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Cheetahtemplate-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com