mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
🐛 Fixed meta data when using tag data in collection (#12137)
closes #12130 When defining a collection with a tag as the data source, the metadata was not correctly applied due to the context array not including 'tag'. This update keeps the context management all in the same context helper file and follows the same pattern as for posts/pages as a data source.
This commit is contained in:
parent
1a6eec40d1
commit
993e45bd88
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,10 @@ function setResponseContext(req, res, data) {
|
||||||
if (!res.locals.context.includes('page')) {
|
if (!res.locals.context.includes('page')) {
|
||||||
res.locals.context.push('page');
|
res.locals.context.push('page');
|
||||||
}
|
}
|
||||||
|
} else if (data && data.tag) {
|
||||||
|
if (!res.locals.context.includes('tag')) {
|
||||||
|
res.locals.context.push('tag');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue