Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/page_rendering/page_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ page_renderer.prototype.render_file_by_template_path_extend_context = function (

}

page_renderer.prototype.render_file_by_template_path_replace_context = function (context_path, context) {
page_renderer.prototype.render_file_by_template_path_replace_context = function (context_path, context, culture) {
const self = this
context = context || {}

const template_path = get_absolute_template_path_by_context_path(context_path)
const culture = enduro.config.cultures[0]
culture = culture || enduro.config.cultures[0]

return self.render_file_by_context(template_path, context, culture)
}
Expand Down
4 changes: 2 additions & 2 deletions libs/temper/temper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const page_renderer = require(enduro.enduro_path + '/libs/page_rendering/page_re
const abstractor = require(enduro.enduro_path + '/libs/abstractor/abstractor')

// Goes through the pages and renders them
temper.prototype.render = function (filename, context) {
temper.prototype.render = function (filename, context, culture) {

// use empty object if no context is provided
context = context || {}
Expand All @@ -21,7 +21,7 @@ temper.prototype.render = function (filename, context) {

return abstractor.abstract_context(context)
.then((context) => {
return page_renderer.render_file_by_template_path_replace_context(filename, context)
return page_renderer.render_file_by_template_path_replace_context(filename, context, culture)
})
}

Expand Down