mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
15 lines
381 B
JavaScript
15 lines
381 B
JavaScript
module.exports = function render(input, context) {
|
|
var content = {};
|
|
|
|
if (input.getContent) {
|
|
input.getContent({
|
|
handlePutTag: function (putTag) {
|
|
content[putTag.into] = putTag;
|
|
}
|
|
});
|
|
}
|
|
|
|
var viewModel = input['*'] || {};
|
|
viewModel.layoutContent = content;
|
|
input.template.render(viewModel, context);
|
|
}; |