0.4.265 - logging and include/loadTemplate in templates and scripts

8 views
Skip to first unread message

Alex Tkachman

unread,
Jun 21, 2011, 2:05:13 PM6/21/11
to gre...@googlegroups.com
Hi All!

I've added important feature to Gretty templates and scripts - now
both have methods include and loadTemplate. You use loadTemplate when
you plan to reuse it during execution and want to save on search.

Both methods take relative path to template or script as first
parameter. The second (optional) parameter is Map of additional
bindings to be passed to included template.

Here is example -
https://github.com/alextkachman/gretty/blob/master/Examples/helloworld/web/templates/main.gpptl
It uses method include to provide header and footer for the page and
loadTemplate for generation parts of the body

Please let me know what do you think.

This change is included in 0.4.265 which available both in maven repo
and on http://code.google.com/p/groovypptest/downloads/list

Alex

Reply all
Reply to author
Forward
0 new messages