[Rest2web-develop] How to use custom macro in template files ?
Brought to you by:
mjfoord
|
From: David C. <da...@ar...> - 2007-01-30 05:16:25
|
Hi there,
I am using rest2web for my own website, and it is working great, but
I have one problem. I would like to use my own python functions in the
templates, and I don't know how to do that. I manage to use my macro in
a index file doing {print_hello}, but I cannot make it work in a
template.txt (using <# print_hello() #>). I thought about adding it in
the namespace using uservalues:
[uservalues]
foo = print_hello
But print_hello is transformer into a string before the template is
processed. So how can I use my own python function in a template file ?
Thanks,
David
|