Document the method by which values are passed from a controller to templateEngine
timgilbert opened this issue · comments
It took me a while to dig up information about what the proper method was to pass data from my controller into the template itself (to wit, that there is a separate Map
parameter to templateEngine.layout()
, which is the only method covered in the docs).
FWIW, this code is what eventually pointed me in the right direction.
We also should do a better job of explaining the difference between the Sinatra-inspired methods on ScalateSupport (find templates by convention; varargs for attributes) vs. the templateEngine interface inherited from Scalate (more explicit; Map for attributes). This has been a point of confusion in the past.
Added basic example of Map(params)