diff options
Diffstat (limited to 'lib/output/base.js')
-rw-r--r-- | lib/output/base.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/output/base.js b/lib/output/base.js index 9c2153d..201eade 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -221,10 +221,19 @@ Output.prototype.onLanguageBook = function(book) { // ---- Utilities ---- +// Return conetxt for the output itself +Output.prototype.getSelfContext = function() { + return { + name: this.name + }; +}; + // Return a default context for templates Output.prototype.getContext = function() { return _.extend( - {}, + { + output: this.getSelfContext() + }, this.book.getContext(), this.book.langs.getContext(), this.book.summary.getContext(), |