Add title to DB
parent
4ac589d5fb
commit
1c3b6c3c5e
|
@ -43,6 +43,7 @@ module.exports = (plugin, app) => {
|
|||
// build the location
|
||||
let loc = '<a href="/">'+app.live.conf['shortname']+'</a>'
|
||||
let crumbs = req.path.split('/')
|
||||
let title = crumbs.reverse().filter(v=>v!==''&&v!=='db').map(v=>v.charAt(0).toUpperCase()+v.slice(1)).join(' - ')
|
||||
for (let i = 1; i < crumbs.length; i++) {
|
||||
if (crumbs[i] == '') continue
|
||||
loc += ' → <a href="'+crumbs.slice(0,i).join('/')+'/'+crumbs[i]+'/">'+(crumbs[i].replace('-', ' '))+'</a>'
|
||||
|
@ -52,7 +53,7 @@ module.exports = (plugin, app) => {
|
|||
content,
|
||||
menu: app.live.menu,
|
||||
location: loc,
|
||||
title: 'gear',
|
||||
title: title,
|
||||
www_name: app.live.conf.www_name,
|
||||
www_copyright: app.live.conf.www_copyright,
|
||||
scripts: ['/js/gear.js'],
|
||||
|
|
Loading…
Reference in New Issue