I have created a custom email template to be used in a form. In the footer of this template I would add some company info (like name, phone, ...) using globals.
I have added the tag {{ company:phone }} (company is the Global Set handle) but doesn't output anything in the email.
The same tag in home page works correctly.
settings) with a text field (with a name like foo)resources/views/vendor/mail/custom-email.antlers.htmlThe Foo value is: {{ settings:foo }}The Foo value is:)Statamic version: 3.0.7
PHP version: 7.4.9
No addons installed
Install method (choose one):
statamic/statamicI think this is probably because it's not being parsed as a view, it's just being parsed as a string which means you can't use the cascade (any site variables) and you can't use tags, like the collection ones.
If the gents wanted I could have a go at implementing just the globals data into mail views?
We just don't pass all the same data into the email view that we do into the front-end. But, we can.
Yes please! It would be very useful to pull in globals for social media or contact information.
@damcclean opened a PR for this which is on our list to review shortly here. Hang tight!
Most helpful comment
@damcclean opened a PR for this which is on our list to review shortly here. Hang tight!
https://github.com/statamic/cms/pull/2411