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"> <li class="visible-xs">
<a href="/search">[[global:header.search]]</a> <a href="/search">[[global:header.search]]</a>
</li> </li>
<li> <!-- BEGIN navigation -->
<a href="/"></a> <li class="{navigation.class}">
<a href="{navigation.route}">{navigation.text}</a>
</li> </li>
<!-- END navigation -->
</ul> </ul>
<form id="search-form" class="navbar-form navbar-right hidden-xs" role="search" method="GET" action=""> <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 * 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

Loading…
Cancel
Save