Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 11 years ago
commit f807df84d8

@ -59,9 +59,11 @@
<li class="visible-xs">
<a href="/search">[[global:header.search]]</a>
</li>
<li>
<a href="/"></a>
<!-- BEGIN navigation -->
<li class="{navigation.class}">
<a href="{navigation.route}">{navigation.text}</a>
</li>
<!-- END navigation -->
</ul>
<form id="search-form" class="navbar-form navbar-right hidden-xs" role="search" method="GET" action="">

@ -44,6 +44,11 @@ var express = require('express'),
* accepts: metaTags
*/
app.build_header = function (options, callback) {
var custom_header = {
'navigation': []
};
plugins.fireHook('filter:header.build', custom_header, function(err, custom_header) {
var defaultMetaTags = [{
name: 'viewport',
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,
relative_path: nconf.get('relative_path'),
meta_tags: metaString,
clientScripts: clientScripts
clientScripts: clientScripts,
navigation: custom_header.navigation
};
translator.translate(templates.header.parse(templateValues), function(template) {
callback(null, template);
});
});
};
// Middlewares

Loading…
Cancel
Save