simplenews-newsletter-footer.tpl.php

Tracking 6.x-2.x branch
  1. drupal
    1. 6 contributions/simplenews/theme/simplenews-newsletter-footer.tpl.php

Default theme implementation to format the simplenews newsletter footer.

Copy this file in your theme directory to create a custom themed footer. Rename it to simplenews-newsletter-footer--<tid>.tpl.php to override it for a newsletter using the newsletter term's id.

Available variables:

  • $node: newsletter node object
  • $language: language object
  • $key: email key [node|test]
  • $format: newsletter format [plain|html]
  • $unsubscribe_text: unsubscribe text
  • $test_message: test message warning message

Available tokens:

  • [simplenews-unsubscribe-url]: unsubscribe url to be used as link

for more tokens: see simplenews_token_list()

Note that unsubscribe links are broken in case of test send to a non-subscriber.

See also

template_preprocess_simplenews_newsletter_footer()

File

View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to format the simplenews newsletter footer.
  5. *
  6. * Copy this file in your theme directory to create a custom themed footer.
  7. * Rename it to simplenews-newsletter-footer--<tid>.tpl.php to override it for a
  8. * newsletter using the newsletter term's id.
  9. *
  10. * Available variables:
  11. * - $node: newsletter node object
  12. * - $language: language object
  13. * - $key: email key [node|test]
  14. * - $format: newsletter format [plain|html]
  15. * - $unsubscribe_text: unsubscribe text
  16. * - $test_message: test message warning message
  17. *
  18. * Available tokens:
  19. * - [simplenews-unsubscribe-url]: unsubscribe url to be used as link
  20. * for more tokens: see simplenews_token_list()
  21. *
  22. * Note that unsubscribe links are broken in case of test send to a non-subscriber.
  23. *
  24. * @see template_preprocess_simplenews_newsletter_footer()
  25. */
  26. ?>
  27. <?php if ($format == 'html'): ?>
  28. <p class="newsletter-footer"><a href="[simplenews-unsubscribe-url]"><?php print $unsubscribe_text ?></a></p>
  29. <?php else: ?>
  30. -- <?php print $unsubscribe_text ?>: [simplenews-unsubscribe-url]
  31. <?php endif ?>
  32. <?php if ($key == 'test'): ?>
  33. - - - <?php print $test_message ?> - - -
  34. <?php endif ?>