mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
Included specific member props in theme service
no-issue This simplifies the @member prop in themes, and includes a subscribed property
This commit is contained in:
parent
00604bf522
commit
e881caab76
@ -78,9 +78,14 @@ function updateLocalTemplateOptions(req, res, next) {
|
||||
url: urlUtils.urlFor('home', {secure: req.secure, trailingSlash: false}, true)
|
||||
};
|
||||
|
||||
const member = req.member ? {
|
||||
email: req.member.email,
|
||||
subscribed: req.member.plans.length !== 0
|
||||
} : null;
|
||||
|
||||
hbs.updateLocalTemplateOptions(res.locals, _.merge({}, localTemplateOptions, {
|
||||
data: {
|
||||
member: req.member,
|
||||
member: member,
|
||||
site: siteData,
|
||||
blog: siteData
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user