putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
63 stars 25 forks source link

Add `campaign.subject` variable in templates #386

Closed adrianjean closed 1 year ago

adrianjean commented 1 year ago

Forgive me if this already exists, but it would be helpful to be able to access the Subject line text from the Sendout in the template, especially when Title field is enabled and there is a separate Subject field.

bencroker commented 1 year ago

The subject is tied to the sendout, so {{ sendout.subject}} should do what you're after.

adrianjean commented 1 year ago

Ah ok yes — that variable works on testing the sendout in an actual email — thank you! One note tho, the variable doesn't seem to show in the sendout preview tab.

bencroker commented 1 year ago

You’re right. I just changed that behaviour in https://github.com/putyourlightson/craft-campaign/commit/e34e24947d7e09e957b80f83a4175c124373903d for the next release.

bencroker commented 1 year ago

Released in version 2.7.1.