simplenews-newsletter-body.tpl.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to format the simplenews newsletter body.
  5. *
  6. * Copy this file in your theme directory to create a custom themed body.
  7. * Rename it to override it. Available templates:
  8. * simplenews-newsletter-body--[tid].tpl.php
  9. * simplenews-newsletter-body--[view mode].tpl.php
  10. * simplenews-newsletter-body--[tid]--[view mode].tpl.php
  11. * See README.txt for more details.
  12. *
  13. * Available variables:
  14. * - $build: Array as expected by render()
  15. * - $build['#node']: The $node object
  16. * - $title: Node title
  17. * - $language: Language code
  18. * - $view_mode: Active view mode
  19. * - $simplenews_theme: Contains the path to the configured mail theme.
  20. * - $simplenews_subscriber: The subscriber for which the newsletter is built.
  21. * Note that depending on the used caching strategy, the generated body might
  22. * be used for multiple subscribers. If you created personalized newsletters
  23. * and can't use tokens for that, make sure to disable caching or write a
  24. * custom caching strategy implemention.
  25. *
  26. * @see template_preprocess_simplenews_newsletter_body()
  27. */
  28. ?>
  29. <?php
  30. $node_url = url('node/'.$build['#node']->nid, array('absolute' => TRUE));
  31. ?>
  32. <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  33. <tbody>
  34. <tr>
  35. <td style="padding: 37px 0; background-color: #eeeeee;" align="center" bgcolor="#eeeeee">
  36. <!-- #nl_container -->
  37. <p style="text-align:center; margin:5px 0;"><a href="<?php print $node_url; ?>" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a>
  38. <table bgcolor="#ffffff" style="margin: 0; border: 1px solid #dddddd; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="600" border="0" cellspacing="0" cellpadding="0">
  39. <tbody>
  40. <tr>
  41. <td>
  42. <!-- node content -->
  43. <?php print render($build); ?>
  44. <table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">
  45. <tbody>
  46. <tr>
  47. <td style="vertical-align: top; padding: 5px 0;" width="580">
  48. <table style="border-collapse: collapse; width: 565px; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="565" cellspacing="0" cellpadding="0">
  49. <tbody>
  50. <tr>
  51. <td style="padding: 5px 0 5px 5px; line-height: normal;">
  52. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  53. <tbody>
  54. <tr>
  55. <td>
  56. <table border="0" cellspacing="0" cellpadding="0" align="left">
  57. <tbody>
  58. <tr>
  59. <td>
  60. <table style="border-collapse: collapse; align: left;" cellspacing="0" cellpadding="0" align="left">
  61. <tbody>
  62. <tr>
  63. <td style="padding: 2px; margin: 0; vertical-align: top;">
  64. <a href="http://www.facebook.com/sharer.php?u=<?php print $node_url; ?>" target="_blank" style="display: block; border: none; text-decoration: none;">
  65. <img src="http://materio.com/sites/default/files/ico_social_facebook.png" alt="Facebook" style="vertical-align: top; border: none;">
  66. </a>
  67. </td>
  68. <td style="padding: 2px; margin: 0; vertical-align: top;">
  69. <a href="http://twitter.com/share?url=<?php print $node_url; ?>" target="_blank" style="display: block; border: none; text-decoration: none;">
  70. <img src="http://materio.com/sites/default/files/ico_social_twitter.png" alt="Twitter" style="vertical-align: top; border: none;">
  71. </a>
  72. </td>
  73. <td style="padding: 2px; margin: 0; vertical-align: top;">
  74. <a href="http://www.linkedin.com/shareArticle?url=<?php print $node_url; ?>" target="_blank" style="display: block; border: none; text-decoration: none;">
  75. <img src="http://materio.com/sites/default/files/ico_social_linkedin.png" alt="Linkedin" style="vertical-align: top; border: none;">
  76. </a>
  77. </td>
  78. <td style="padding: 2px; margin: 0; vertical-align: top;">
  79. <a href="http://pinterest.com/hello0691/ze-daily-mat%C3%A9rio/" target="_blank" style="display: block; border: none; text-decoration: none;">
  80. <img src="http://materio.com/sites/default/files/ico_social_pinterest.png" alt="Pinterest" style="vertical-align: top; border: none;">
  81. </a>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. </td>
  87. </tr>
  88. </tbody>
  89. </table>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. </td>
  95. </tr>
  96. </tbody>
  97. </table>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>