Fix bug with replacement 4.1

Signed-off-by: Maksym Mishchanchuk <maksym.mishchanchuk@splynx.com>
pull/7149/head
Maksym Mishchanchuk 3 years ago
parent dc0d54fbda
commit 2521e9f913

@ -464,13 +464,6 @@ router.get('/*', async (req, res, next) => {
for (const index in splitPath) {
const item = splitPath[index];
let title = item
if (item.match(/[\d+]\_[\d+]/)) {
title = item.replace('_', '.')
} else {
title = title.replace('_', ' ')
title = title.charAt(0).toUpperCase() + title.slice(1);
}
let pathForBreadcrumbsPage = '';
if (index === '0') {
@ -481,6 +474,19 @@ router.get('/*', async (req, res, next) => {
}
}
let title = item
if (item.match(/[\d+]\_[\d+]/)) {
title = item.replace('_', '.')
page.breadcrumbsItems.push({
name: title,
path: pathForBreadcrumbsPage
})
continue;
} else {
title = title.replace('_', ' ')
title = title.charAt(0).toUpperCase() + title.slice(1);
}
const breadcrumbsPageArgs = pageHelper.parsePath(pathForBreadcrumbsPage, { stripExt })
let pageForBreadcrumbsTitle = title;

Loading…
Cancel
Save