Simplenews theming and snippets
Newsletter theming
You can customize the theming of newsletters. Copy any of the *.tpl.php files from the simplenews module directory to your theme directory. Both general and by-newsletter theming can be performed.
Theme newsletter body
* simplenews-newsletter-body.tpl.php (for all newsletters)
* simplenews-newsletter-body--[tid].tpl.php (for newsletter series tid;
where [tid] is replaced by the term id of the newsletter taxonomy term.
Theme newsletter footer
* simplenews-newsletter-footer.tpl.php (for all newsletters)
* simplenews-newsletter-footer--[tid].tpl.php (for newsletter series tid)
The files are self documented listing all available variables.
Using the Display fields settings each field of a simplenews newsletter can be displayed or hidden in plain text and/or HTML newsletters. You find these settings at: admin/content/node-type/my-node-type/display
CSS in HTML newsletter
Although simplenews does not support HTML newsletters on its own, this tip is worth mentioning: Place your CSS inside the HTML <body>
tag as described here.
Simplenews code snippets
A single subscription block for all newsletters
Create a custom block with this php code:
<?php
module_load_include('inc', 'simplenews', 'simplenews.subscription');
print drupal_get_form('simplenews_subscription_manager_form');
?>
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion