Groovy Renderers Two ways to use Groovy in your page templates: asa Groovlet and as a GSP A) Groovlet Renderer A Roller GroovletRenderer that can evaluate a Roller template as Groovy code with Groovlet-style "out" and "html" bindings. The implementation: org.apache.roller.scripting.GroovletRenderer org.apache.roller.scripting.GroovletRendererFactory org.apache.roller.scripting.GroovyRollerBinding Here's an example Hello World template: println "
Hello World" Here's an example template that displays recent entries from a weblog: html.html { // html is implicitly bound to new MarkupBuilder(out) head { title(model.weblog.name) } body { h1(model.weblog.name) i(model.weblog.description) map = model.getWeblogEntriesPager().getEntries(); map.keySet().each() { map.get(it).each() { h2(it.title) p(it.text) br() } } } } B) GSP Renderer A Roller GSPRenderer that can evaluate a Roller template as a Groovy Template with GSP-style "out" and "html" bindings. The implementation: org.apache.roller.scripting.GSPRenderer org.apache.roller.scripting.GSPRendererFactory org.apache.roller.scripting.GSPRollerBinding Here's an example Hello World template: <%= "Hello World" %> Here's an example template that displays recent entries from a weblog:${it.text}