simplenews-newsletter-footer.tpl.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. * @todo Update the available variables.
  11. * Available variables:
  12. * - $build: Array as expected by render()
  13. * - $build['#node']: The $node object
  14. * - $language: language code
  15. * - $key: email key [node|test]
  16. * - $format: newsletter format [plain|html]
  17. * - $unsubscribe_text: unsubscribe text
  18. * - $test_message: test message warning message
  19. * - $simplenews_theme: path to the configured simplenews theme
  20. *
  21. * Available tokens:
  22. * - [simplenews-subscriber:unsubscribe-url]: unsubscribe url to be used as link
  23. *
  24. * Other available tokens can be found on the node edit form when token.module
  25. * is installed.
  26. *
  27. * @see template_preprocess_simplenews_newsletter_footer()
  28. */
  29. ?>
  30. <?php if (!$opt_out_hidden): ?>
  31. <?php if ($format == 'html'): ?>
  32. <p class="newsletter-footer"><a href="[simplenews-subscriber:unsubscribe-url]"><?php print $unsubscribe_text ?></a></p>
  33. <?php else: ?>
  34. -- <?php print $unsubscribe_text ?>: [simplenews-subscriber:unsubscribe-url]
  35. <?php endif ?>
  36. <?php endif; ?>
  37. <?php if ($key == 'test'): ?>
  38. - - - <?php print $test_message ?> - - -
  39. <?php endif ?>