In order to create a fully customized newsletter, simplenews_newsletter_body template needs access to the $context['node']. I have a newsletter which uses CCK node_reference fields to point to other nodes on the website. By having $node, I can load the other node's teasers into the email template and send out a fully customized newsletter.

Comments

sutharsan’s picture

Status: Needs review » Fixed
StatusFileSize
new19.15 KB

I like the idea but want to take it a step further. I want the newsletter body (and footer) to be more easy themable using .tpl.php files. But this should not have a big impact on performance. For this reason the body and footer must be themed and buffered. But since the footer contains recipient specific data (the unscubscription link) is requires a different approach using tokens in the footer.

The attached patch is the result. Patch is committed.

Note that a few existing tokens have changed:
!newsletter is now: !newsletter_name
!confirmation_url is now: !confirm_subscribe_url or !confirm_unsubscribe_url
If you have customized the (un)subscription confirmation emails you may need to modify tokens in it.

sutharsan’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.