concept layout in category scalatra

appears as: layout, layouts, The layout, layout, The layout
Scalatra in Action

This is an excerpt from Manning's book Scalatra in Action.

2.6.2. Adding a layout

You can quickly make things look nicer by wrapping the page template in a layout that includes some boilerplate CSS. Open the layouts folder, and create a new file called default.ssp containing the contents of listing 2.6. By convention, Scalate will use this file as the layout for your pages/show.ssp template. It will wrap the contents of listing 2.6 around the HTML output of each of your controller’s actions, inserting the action’s output into the layout at the point where the layout says <%= unescape(body) %>.

Figure 2.10. Adding a layout