mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-10 07:55:24 +02:00
fix
This commit is contained in:
parent
71842a6c35
commit
481066f039
2 changed files with 3 additions and 3 deletions
|
@ -43,10 +43,10 @@ router.get('/page/:id', async (req, res, next) => {
|
||||||
try {
|
try {
|
||||||
let page = await Pages.get(pageId);
|
let page = await Pages.get(pageId);
|
||||||
|
|
||||||
let parentTitle = (await page.parent).title;
|
let pageParent = await page.parent;
|
||||||
|
|
||||||
res.render('pages/page', {
|
res.render('pages/page', {
|
||||||
page, parentTitle
|
page, pageParent
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
res.status(404);
|
res.status(404);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</a>
|
</a>
|
||||||
{% if page._parent %}
|
{% if page._parent %}
|
||||||
<a href="/page/{{ page._parent }}" class="page__header-nav">
|
<a href="/page/{{ page._parent }}" class="page__header-nav">
|
||||||
Parent {{ parentTitle }}
|
Parent {{ pageParent.title }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<time class="page__header-time">
|
<time class="page__header-time">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue