marko/taglibs/layout/PlaceholderTag.js
2014-01-24 14:27:15 -07:00

16 lines
428 B
JavaScript

module.exports = {
render: function (input, context) {
var content = input.content[input.name];
if (content) {
if (content.value) {
context.write(content.value);
} else if (content.invokeBody) {
content.invokeBody();
}
} else {
if (input.invokeBody) {
input.invokeBody();
}
}
}
};