
yoke.examples.groovy.2.0.16.source-code.bodyOnly.hdb Maven / Gradle / Ivy
The newest version!
Templates
{{engineName}}:
Using the {{engineName}} Template Engine is very straightforward and speedy.
Layout Support:
Render both the main template and the layout: place the {{TemplateBody}} placeholder inside the layout template and Yoke will replace it with the main template body.
Template Caching:
Yoke caches the template files in memory and only reloads them if the file has changed or the cache has expired.
Inside the router
No layout:
request.response.render 'template.html', next
With layout:
request.response.render 'bodyOnly.html','layout.html', next
Inside the template
Iterations:
<% 3.times { %>
Hello World!
<% } %>
Conditionals:
<% if (session != null) { %>
My session id is ${session.id}
<% } else println "No session created." %>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy