From fb097dd69b08649f0b4885a4cb2cf859d8c805c8 Mon Sep 17 00:00:00 2001 From: Tom Wadley Date: Mon, 19 Sep 2022 12:20:00 +1000 Subject: [PATCH] Added member labels to template options no issue Being able to access a member's label from the theme template allows customizing the content based on the type of member. --- .../theme-engine/middleware/update-local-template-options.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/core/core/frontend/services/theme-engine/middleware/update-local-template-options.js b/ghost/core/core/frontend/services/theme-engine/middleware/update-local-template-options.js index c0f970134f..cdeca029fe 100644 --- a/ghost/core/core/frontend/services/theme-engine/middleware/update-local-template-options.js +++ b/ghost/core/core/frontend/services/theme-engine/middleware/update-local-template-options.js @@ -33,6 +33,7 @@ function updateLocalTemplateOptions(req, res, next) { default_payment_card_last4: sub.default_payment_card_last4 || '****' }); }), + labels: req.member.labels, paid: req.member.status !== 'free', status: req.member.status } : null;