function(doc, req) { // !code mustache.js // !json templates/layout.mustache // !json templates/<%= pluralized_model_name %>/show.mustache if(doc) { provides("html", function() { var view = { title: "Showing <%= model_name.humanize %>", body: { title: doc.title, body: doc.body, id: doc._id } }; return Mustache.to_html(templates.layout, view, { body: templates.<%= pluralized_model_name %>.show }); }); } else { return '404 not found'; } }