Permalink
Browse files

fixing layout/page context issue from #424

  • Loading branch information...
1 parent b6fd9d2 commit d2f5ed9452fe02afe605850f0f354372c2053002 @doowb doowb committed Jan 14, 2014
Showing with 10 additions and 9 deletions.
  1. +10 −9 tasks/assemble.js
View
19 tasks/assemble.js
@@ -549,18 +549,19 @@ module.exports = function(grunt) {
context.layoutName = pageLayout.layoutName;
data = _.extend({}, data, pageLayout.data);
- // extend again
- options.data = undefined;
- options.pages = undefined;
- options.layout = undefined;
- options.collections = undefined;
- context = _.extend({}, context, assemble.util.filterProperties(options), data, pageContext);
- options.data = data;
- options.pages = pages;
- options.collections = collections;
}
}
+ // extend again
+ options.data = undefined;
+ options.pages = undefined;
+ options.layout = undefined;
+ options.collections = undefined;
+ context = _.extend({}, context, assemble.util.filterProperties(options), layout.data, data, pageContext);
+ options.data = data;
+ options.pages = pages;
+ options.collections = collections;
+
// add omitted collections back to pageContext
pageContext = _.merge(pageContext, pageCollections);

0 comments on commit d2f5ed9

Please sign in to comment.