Categories
CMS Drupal Mastering Development

D8: Theming Subscriber Field in Simplenews Issues

I need to address my subscribers in a more personal way. Thus I added fields for Mr./Mrs., firstname, lastname to the subscription block, and data gets collected nicely.

However, I can’t see how to theme these fields in simplenews-newsletter-body.html.twig

In the header of this template there’s an example printing the subscriber’s (built-in) mail:

 

But trying the same as doesn’t do anything. I tried a lot of variations to this approach, but to no avail.

What’s the secret of getting custom subscriber fields to print with TWIG?

Leave a Reply

Your email address will not be published. Required fields are marked *