|
|
@ -44,6 +44,11 @@ var express = require('express'),
|
|
|
|
* accepts: metaTags
|
|
|
|
* accepts: metaTags
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
app.build_header = function (options, callback) {
|
|
|
|
app.build_header = function (options, callback) {
|
|
|
|
|
|
|
|
var custom_header = {
|
|
|
|
|
|
|
|
'navigation': []
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('filter:header.build', custom_header, function(err, custom_header) {
|
|
|
|
var defaultMetaTags = [{
|
|
|
|
var defaultMetaTags = [{
|
|
|
|
name: 'viewport',
|
|
|
|
name: 'viewport',
|
|
|
|
content: 'width=device-width, initial-scale=1.0, user-scalable=no'
|
|
|
|
content: 'width=device-width, initial-scale=1.0, user-scalable=no'
|
|
|
@ -69,12 +74,14 @@ var express = require('express'),
|
|
|
|
csrf: options.res.locals.csrf_token,
|
|
|
|
csrf: options.res.locals.csrf_token,
|
|
|
|
relative_path: nconf.get('relative_path'),
|
|
|
|
relative_path: nconf.get('relative_path'),
|
|
|
|
meta_tags: metaString,
|
|
|
|
meta_tags: metaString,
|
|
|
|
clientScripts: clientScripts
|
|
|
|
clientScripts: clientScripts,
|
|
|
|
|
|
|
|
navigation: custom_header.navigation
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
translator.translate(templates.header.parse(templateValues), function(template) {
|
|
|
|
translator.translate(templates.header.parse(templateValues), function(template) {
|
|
|
|
callback(null, template);
|
|
|
|
callback(null, template);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Middlewares
|
|
|
|
// Middlewares
|
|
|
|