mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #5184 from lmoe/master
Added res.locals into the prePostsRender filter call
This commit is contained in:
commit
1e6f6237e1
1 changed files with 4 additions and 4 deletions
|
@ -145,7 +145,7 @@ frontendControllers = {
|
||||||
setReqCtx(req, page.posts);
|
setReqCtx(req, page.posts);
|
||||||
|
|
||||||
// Render the page of posts
|
// Render the page of posts
|
||||||
filters.doFilter('prePostsRender', page.posts).then(function (posts) {
|
filters.doFilter('prePostsRender', page.posts, res.locals).then(function (posts) {
|
||||||
getActiveThemePaths().then(function (paths) {
|
getActiveThemePaths().then(function (paths) {
|
||||||
var view = paths.hasOwnProperty('home.hbs') ? 'home' : 'index';
|
var view = paths.hasOwnProperty('home.hbs') ? 'home' : 'index';
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ frontendControllers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render the page of posts
|
// Render the page of posts
|
||||||
filters.doFilter('prePostsRender', page.posts).then(function (posts) {
|
filters.doFilter('prePostsRender', page.posts, res.locals).then(function (posts) {
|
||||||
getActiveThemePaths().then(function (paths) {
|
getActiveThemePaths().then(function (paths) {
|
||||||
var view = template.getThemeViewForTag(paths, options.tag),
|
var view = template.getThemeViewForTag(paths, options.tag),
|
||||||
// Format data for template
|
// Format data for template
|
||||||
|
@ -251,7 +251,7 @@ frontendControllers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render the page of posts
|
// Render the page of posts
|
||||||
filters.doFilter('prePostsRender', page.posts).then(function (posts) {
|
filters.doFilter('prePostsRender', page.posts, res.locals).then(function (posts) {
|
||||||
getActiveThemePaths().then(function (paths) {
|
getActiveThemePaths().then(function (paths) {
|
||||||
var view = paths.hasOwnProperty('author.hbs') ? 'author' : 'index',
|
var view = paths.hasOwnProperty('author.hbs') ? 'author' : 'index',
|
||||||
// Format data for template
|
// Format data for template
|
||||||
|
@ -336,7 +336,7 @@ frontendControllers = {
|
||||||
|
|
||||||
setReqCtx(req, post);
|
setReqCtx(req, post);
|
||||||
|
|
||||||
filters.doFilter('prePostsRender', post).then(function (post) {
|
filters.doFilter('prePostsRender', post, res.locals).then(function (post) {
|
||||||
getActiveThemePaths().then(function (paths) {
|
getActiveThemePaths().then(function (paths) {
|
||||||
var view = template.getThemeViewForPost(paths, post),
|
var view = template.getThemeViewForPost(paths, post),
|
||||||
response = formatResponse(post);
|
response = formatResponse(post);
|
||||||
|
|
Loading…
Add table
Reference in a new issue