pmlopes/yoke — pull request #72 by silviucm (2014-02-11 05:40:20+00:00)
Title: Layout support for Yoke templates

Hi Paulo,

I think your framework is great, and this is hopefully my first contribution, if you find it useful.
I added layout support for the template engines. I focused mostly on Groovy, but we can go from there

basically now you can do:
request.response.render 'bodyOnly.html','layout.html', next
not just
request.response.render 'fullTemplate.html', next

and the expectation is that there is a ${TemplateBody} placeholder in the layout file that will be replaced with the actual main template

I modified the Engine interface a bit, and the response middlewares to support that.
Please note that caching creates a composite key now

Please feel free to review and modify as you see fit, as you're leading this

cheers
silviu