Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/modules/helma/skin.js b/modules/helma/skin.js
- index e35627b..b6e3928 100644
- --- a/modules/helma/skin.js
- +++ b/modules/helma/skin.js
- @@ -38,7 +38,7 @@ function render(skinOrResource, context, scope) {
- } else {
- throw Error("Unknown skin object: " + skinOrResource);
- }
- - return skin.render(context);
- + return skin.render(context, scope);
- }
- /**
- @@ -105,7 +105,7 @@ function Skin(mainSkin, subSkins, parentSkin) {
- var self = this;
- - this.render = function render(context) {
- + this.render = function render(context, macroContext) {
- // extend context by globally provided macros and filters.
- // user-provided context overrides globally defined stuff
- var configs = require('helma/webapp/env').configs;
- @@ -115,7 +115,10 @@ function Skin(mainSkin, subSkins, parentSkin) {
- context = Object.merge(context, require(module));
- }
- }
- - }
- + }
- + if (macroContext) {
- + context = Object.merge(context, macroContext);
- + }
- if (mainSkin.length === 0 && parentSkin) {
- return renderInternal(parentSkin.getSkinParts(), context);
- } else {
Add Comment
Please, Sign In to add comment