mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
if route is home display home as title
This commit is contained in:
@@ -54,6 +54,7 @@ unreadController.get = function (req, res, next) {
|
||||
}, next);
|
||||
},
|
||||
function (data) {
|
||||
data.title = '[[pages:home]]';
|
||||
data.pageCount = Math.max(1, Math.ceil(data.topicCount / settings.topicsPerPage));
|
||||
data.pagination = pagination.create(page, data.pageCount, req.query);
|
||||
|
||||
@@ -66,10 +67,10 @@ unreadController.get = function (req, res, next) {
|
||||
data.selectedCategory = results.watchedCategories.selectedCategory;
|
||||
data.selectedCids = results.watchedCategories.selectedCids;
|
||||
if (req.originalUrl.startsWith(nconf.get('relative_path') + '/api/unread') || req.originalUrl.startsWith(nconf.get('relative_path') + '/unread')) {
|
||||
data.title = '[[pages:unread]]';
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: '[[unread:title]]' }]);
|
||||
}
|
||||
|
||||
data.title = '[[pages:unread]]';
|
||||
data.filters = helpers.buildFilters('unread', filter);
|
||||
|
||||
data.selectedFilter = data.filters.find(function (filter) {
|
||||
|
||||
Reference in New Issue
Block a user