Re: How do I reference functions from another template?
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
If they are in the same directory
auctionmethods.html
#def foo($arg)
<b>$arg</b>
#end def foo
nwew.html
#include "auctionmethods.html"
$foo('bidegg')
On Mon, May 4, 2009 at 6:34 PM, Saul Jaspan <[email protected]> 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") *#
>
> I assume I need to import foo in some way but don't know where it
> lives (I have tried from dir1.dir2.dir3 import foo already ;). Is
> there a way of doing this without first compiling foo.tmpl?
>
> Thanks,
> Saul
>
>
> ------------------------------------------------------------------------------
> 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
>
--
Bidegg worlds best auction site
http://bidegg.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