Last updated August 6, 2012. Created by morthylla on June 9, 2008.
Edited by lellobot, authentictech, hansrossel, stieglitz. Log in to edit this page.
The Drupal 6.x version of Simplenews has full support for CCK template files, for Drupal 5.x it is not possible to use the normal .tpl.php files to make a custom theme for the output of the newsletter, so you have to use contemplate instead.
For Drupal 6
In the simplenews module there are 4 tpl.php files available. One for the block, status, body and footer. The body and footer are the most important ones. They also allow you to style each newsletter in a completely different way.
If you have a newsletter with tid 1126 then copy the body and footer tpl.php files and put them in your admin theme folder and rename them to: simplenews-newsletter-body--1126.tpl.php and simplenews-newsletter-footer--1126.tpl.php. With these you can style the body and footer of newsletter 1126.
Contemplate is not needed for Drupal 6. Use these template files instead. Don't forget to clear the (theme registry) cache.
The contents of those template files are the same as explained in this tutorial which was originally written for Drupal 5.
For Drupal 5
The following instructions describe how you can theme your newsletter with a table and multiple cck fields using the contemplate module for theming the email output. I will also explain how to theme the newsletter add/node form and UI to get a uniform look in input and output.
I will also show how to use nodereference fields to output full nodes, links to nodes or certain fields in a simplenews newsletter, so you can easily assemble content from the whole site.
In this tutorial we will *not* use the "Simplenews template" module as that modules gives you only a header and footer, which is OK for simple designs, but not sufficient for more complex table based designs of newsletters.
Click here for an example of the edit newsletter screen
Click here for the corresponding newsletter
Part 1: Design and preparations
- Make the design of your newsletter in xhtml/css and test it in several email clients. You will notice that even Internet Explorer 6 does a very good job compared to most email clients. You will have to use tables (and probably even nested tables) for your layout, preferably no background images, a width of about 600px and inline css. Check the code of some newsletters with nice designs you receive.
- Install Simplenews, Mimemail, CCK, Tinymce, IMCE, Contemplate modules. Mimemail has been very badly maintained over the past two years and is still in alpha with plenty of bugs. If you are using Mimemail and have php code in your templates you need to set the input format for mimemail to php code at admin/settings/mimemail.
- The Drupal mimemail module allows you to create a file your current theme called mail.css (for instance,
sites/all/themes/YOURTHEME/mail.css) with css code for the newsletter (and other emails send by the system!), but this external css will only have effect in desktop based email clients. Web based email clients like Hotmail, Gmail and Yahoo remove all css which is not inline (so no external files, or definitions possible). The reason they do so is to prevent that your newsletter css would change completely the Hotmail, ... interface itself. If you want a newsletter without external css, you can create an empty mail.css file. For more information about the html and css output of mimemail see http://drupal.org/node/291762. - Determine which parts of your newsletter you will make CCK fields of and what kind of fields you will need for titles, text, links.... I used text fields and nodereference fields. For images we will use the image uploading and resizing functionality of TinyMCE. I tried imagefield, and it worked only half: the image did not display in the email and imagecache did not apply correctly, so some work is needed if you would prefer imagefield instead of the editor. For links I'm using two text fields: one for title and one for url (see next part why).
The htmlmail module has become mature and is a recommended alternative for mimemail. The emogrifier option, which can take some css code inline, is very handy to save on template files. Install the rel_to_abs module if you use a wysiwyg editor with htmlmail so links become absolute.
Part 2: Output of the newsletter
- TinyMCE: Add in visibility node/add/simplenews and node/*/edit to the url list where the editor is visible.
- IMCE: Allow resizing of images, I used imagefields in the rest of the site, and had only two image sizes in the newsletter so adjusted the settings of IMCE so all images were resized to 330px x 330px (the main image had a width of 330px) and IMCE thumbnails to 210px x 210px (the images in the right column had a width of 210px). Of course if you know about pixels you could easily put these values yourself into the resize field but this user interface is rather meant for a end user that does not (want) to know/remember about pixels. Add help text to explain which image option to choose.
- CCK: Remove Body and build all the textfields, textareas and nodereference fields which you will need. Choose for the nodereference fields which content types you would like to have in the select list. If you would like to have a list of links to nodes in your newsletter choose "multiple" for the nodereference field. If you want to output full nodes in your newsletter, go to display fields of the nodereference field and choose "full node".
- Go in admin to Content templates (admin/content/templates/simplenews) click on edit for the one of simplenews, click to "replace body output", copy and paste the full body output in a temporary file and save the file as a copy of the original body just to have the variables ready.
- Make a directory sites/all/contemplates and put a file in there with name node-simplenews-body.tpl.php. Check at admin/content/templates/simplenews if you see the message "This template is being read from sites/all/contemplates/node-simplenews-body.tpl.php . Please make changes to this file or remove it to continue editing here." so you are sure your content template file is working. Copy and paste the html body of the newsletter you made in part 1 in that file and replace the static parts of the newsletter that need dynamic content with the variables that you have in the original contemplate body. This file determines the layout of your newsletter in the email.
- For text fields this is something like
<?php
print $node->field_nieuwsbr_actie[0]['view']
?> - The nodereference fields are very handy to output links to nodes or the full content or teaser of nodes in your newsletter. I did not test the teaser display for the nodereference, but think it is the way you could use if you want to output only specific cck fields of the node. You should specify in the display settings of the content type which fields you want to have visible in the teaser. Then by choosing "teaser" in the display settings of the nodereference field you should get only those specified fields of the node in your newsletter. Be careful as this will influence teasers of that content type in the rest of the site also of course (but there you could use views and views theming to display fields of a node).
- For links I'm not using the link field as the css in a newsletter is inline, so it is better to make a text field for link title and another one for the link url and add them like:
<a href="http://<?php print $node->field_nieuwsbr_extra_link[0]['view'] ?>" target="_blank" style="padding: 2px; background-color: #999999; color: #ffffff; text-transform:uppercase;"><?php print $node->field_nieuwsbr_extra_lktitel[0]['view'] ?></a> - To get automatically generated lists of content, you can also output views (for instance a view of a nodequeue) by adding the following code to node-simplenews-body.tpl.php:
<?php
// Get the view NewsletterArticlequeue
$view = views_get_view('NewsletterArticlequeue');
// check if the view exists and if so output the view
if(!empty($view)){
print '<h2>Featured articles</h2>';
print views_build_view('block', $view);
}
?>
A teaser view does not work perfect out of the box as the links (read more, printfriendly version, share, ...) are printed as well which does not look good in a newsletter. Use a list view with title and body as fields. Select for the body field "teaser" as option to get the teaser part of the body. That way you don't have the links.
A list view is easy to style in Drupal 5 as you can use views theming to theme the list view via an additional template file.
For a table view you might want to add some extra css styles inline to the html of the table and td tags, for instance to make sure that the first column of your table has a width of 150px and has a bold font.
This can be easily done by overriding the theme function for the view and adding the style to the td:$row[0]['style'] .= 'width:100px; font-weight:bold;';
or you can add inline css styles to the table elementreturn theme('table', $view->table_header, $rows, array('style' => 'width:100%;'));
The complete override to be pasted in template.php for a view called NewsletterTable is:<?php
/**
* Display the nodes of a view as a table. Added extra inline styles to td and table elements
*/
function phptemplate_views_view_table_NewsletterTable($view, $nodes, $type) {
$fields = _views_get_fields();
foreach ($nodes as $node) {
$row = array();
foreach ($view->field as $field) {
if ($fields[$field['id']]['visible'] !== FALSE) {
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
$row[] = $cell;
}
}
// Add some inline css styles to the td of the first column
$row[0]['style'] .= 'width:100px; font-weight:bold;';
// Add some inline css styles to the td of the second column
$row[1]['style'] .= 'font-style:italic; font-size:12px;';
$rows[] = $row;
}
// Add some inline css styles to the table tag
return theme('table', $view->table_header, $rows, array('style' => 'width:100%;'));
}
?>
- For text fields this is something like
- Paste the whole static body part of your newsletter design in the body part of the content template
- Now you should have a newsletter where you can add titles, text, images, links to nodes or full nodes. Test to check. You could stop here if you are satisfied, but I find it nicer if the user interface, the node/add/simplenews page is in the same design as the newsletter itself.
Part 3: Style the UI: the newsletter input form
- Make a file node-simplenews-edit.tpl.php and put it in your theme folder
- Add the following code to template.php to connect this template file for your simplenews newsletter edit form:
<?php
<br />
function phptemplate_node_form($form) {
if ($form['#node']->type == 'simplenews') {
return _phptemplate_callback('node-simplenews-edit', array('form' => $form));
}
else {
return theme_node_form($form);
}
}
?> - Copy the newsletter code from the body part of the contemplate (or the file where you took it from) and paste it here.
- Remove any parts you don't need here (I removed the link on top of the newsletter with the link to the node if your email client cannot read the newsletter).
- Replace all parts that have dynamic content with the corresponding drupal_render code:
Example:becomes<?php
print $node->field_nieuwsbr_actie[0]['view']
?><?php
print drupal_render($form['field_nieuwsbr_actie']['0']['value']);
?> - I could not print out the multiple nodereference fields this way so to make it easy I just wrapped them in a group and printed the input of the group. It's a workaround, so if anybody knows how to drupal_render nodereference fields (or image fields) let me know. With the "group workaround" just go to content types, add a group for each nodereference field and put that field inside the group. Then just drupal_render the group:
<?php
print drupal_render($form['group_promoties']);
?> - Put after the newsletter code to output the rest of the simplenews fields. Wrap it in a div if you need some margin, padding or background or make an extra row in your table design.
<?php
print drupal_render($form);
?> - Go to node/add/simplenews to check if it looks ok. Add a class to the main table if it is necessary to fix some margins or paddings. This is no longer an email so you can use external css files again.
- Send a newsletter to check.
Part 4: Style the online version of the newsletter
- Make a link on top of your newsletter, something like "Cannot read this newsletter? click here", with a link to the node of this newsletter (check variables in content template):
<a href="http://www.example.com/node/<?php print $node->nid ?>" target="_blank">click here </a> - Make a file node-simplenews.tpl.php and put it in your theme directory.
- Style node-simplenews.tpl.php the usual way.
Comments
Drupal 6 Version
Would be sweet to have a dedicated Drupal 6 Version of this article!
I found the little comment about D6, but for a beginner it is hard to filter out the D6-relevant infos.
I would write it myself, if I knew how it works. Sorry.
One interesting info would be how to get a CSS-free Newsletter. As I understand, mimemail always puts the normal web CSS on top?
If I remember correctly Mime
If I remember correctly Mime Mail has an option to specify your own css file.
-- Erik
Drupal trainer at Wizzlern
Ah yes, I should have updated
Ah yes, I should have updated my comment here!
The solution if you want no CSS is to give mimemail an empty
mail.cssfile in your theme. This will replace the usual site CSS, which would otherwise be added to the newsletter. It will still create the<style>tags afaik, but this doesn't hurt.geez - not something us mere
geez - not something us mere mortals are capable of doing....
Nice article tho - I'll aspire to trying to tackle it.
Things to add to this article
Things that can be useful to add to this article (or a D6 rewrite):
Requirements checklist (see the simplenews project page for further links):
Nice information, but I don't
Nice information, but I don't think all of it fits in this handbook page as this page is mainly about the theming/layout part of the newsletter. You're adding information about extra modules, access rights, ... which is very interesting, so I would recommend making one or more extra handbook pages of it (goto the mail simplenews page and "Add new page". Anyone who is logged in is free to make handbook pages so you could add the extra modules as an extra page with maybe some extra information on how to setup and how the results look like. I would be very interested in that;
KOBA - Drupal Webdesign & Webdevelopment
Useful, though I cannot theme different newsletters...
Hello,
Very useful article, managed to follow this up until the point of theming different newsletter types.
I have set up two newsletters, Foo and Bar that need to have a different theme. It appears the tid (is this the Taxonomy ID?) for the two newsletters is 2 and 3 respectively. So I have created simplenews-newsletter-body--2.tpl.php and simplenews-newsletter-body--3.tpl.php. I get the following error when attempting to preview the newsletter:
So it looks like my simplenews is only configured to look for one template file (that it cannot find), or do I need to adjust something to get this to work?
Big thanks to anyone who can solve this!
J
For Drupal 6 no need to use
For Drupal 6 no need to use contemplate (but you can if you want).
tid is indeed taxonomy id.
I'm using different themes for newsletters, with template files like simplenews-newsletter-body--1126.tpl.php.
I think you forgot to do clear cache. Without clearing the theme registry cache Drupal wil not see your new template files.
KOBA - Drupal Webdesign & Webdevelopment
Using CCK IMCE Image Field
Great write-up, many thanks!
I used the CCK IMCE Image Field but to get it to work had to use the following output to make the image path absolute:
<img src="http://www.example.com/<?php print $node->field_image[0][imceimage_path]?>" width="<?php print $node->field_image[0][imceimage_width]?>" height="<?php print $node->field_image[0][imceimage_height]?>" alt="<?php print $node->field_image[0][imceimage_alt]?>"/>images that are not attached
I am completely unclear about how to add images inside the text areas that do not show up as attachments. Would someone please please please help?
Elena
The CSS file
Could someone please send me the base CSS file, as shown in the example above.
Kind regards.
DB Tarquin
jotgrewal@gmail.com
Important Reminder for D6
The newsletters are sent from the admin side of your site. The renamed and modified tpl files must be placed in your admin theme file, not in your public theme file.
Style different online versions of the newsletter
Is there anyway to style different online versions of the newsletter? I currently have three different newsletters, all of which have very different styles. I have tried adding the tid to the end (eg node-simplenews--46.tpl.php but it doesn't recognise this.)
Bob, you forgot to add the
Bob, you forgot to add the "body" or "footer" portion of the filename... there are four possible files overall, two of which you would be mostly concerned with:
simplenews-newsletter-body--46.tpl.php
simplenews-newsletter-footer--46.tpl.php
Each should go in the root of your theme's directory.
Don't forget to flush your cache after making changes! :D
__________
Regards,
Chad Hester
Hi ChadThanks for your
Hi Chad
Thanks for your help
Regards
Bob
great tutorial,,,,,but
This has been a very helpful guide, although I'm having one little issue, and perhaps I'm missing somthing, and perhaps I should ask this over in CCK, but I'll shout out here too.
My nodereference links in my newsletters are just that,,,,,relative (my links end up missing the domain) not absolute URLs. What could I possibly be doing wrong or missing. They work fine in the actual simplenews output node, but the newletter come through without the domain.
Any help I'd appreciate it.
workaround
well, my simple solution for now, is to simply force drupal to create absolute links upon content creation. any other thoughts on this are welcome though.
_
I think the D6 tutorial needs a complete rewrite to clarify the how to do it - unfortunately I won't have enough know-how to do that - happy to contribute though.
I just spend a great deal of time with some good help from Atul creating a matching online and email version of a newsletter for www.mallsandmore.com.
We ended up writing a module and created two tpl.php files for online and emailed version to look almost alike.
We did all this in a real rush and there has been no time to write it all up - and we are just about at the end of testing it.
Hopefully more when it is all ready and been tested for a while.
-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de
Malls and More
Help
I too would be happy to help document this for D6 it has taken me over 16 hours of researching something that probably should not have taken so long. I'd be interested in knowing what you have come up with. This seems like something nearly everyone needs and I find it difficult to understand why it is so difficult.
Lansing Web Design with Drupal
_
I had some Drupal experts solving it all for me.
With this I have some idea of what was done, but have no documentation.
Basically we have two files - in the theme directory:
my_newsletter.tpl.php - for online viewing
and
simplenews-newsletter-body--278.tpl.php - for emailing
and we have a module called "my"
<?php
function my_block($op = 'list', $delta = 0, $edit = array())
{
}
function mm_nodeapi(&$node, $op, $a3, $a4){
if($op == 'view'){
//previously use if($node->nid == 20162) condition
if($node->taxonomy['278']){
unset($node->content);
$node->content['body']['#value'] = theme('my_newsletter', $node);
}
if($node->type == 'malls_directory'){
$block = module_invoke('gmap_location', 'block', 'view', 0);
$node->content['location_map']['#value'] = '<div class="node-location-block">'.$block['content'].'</div>';
}
}
}
function dout($object)
{
print "<pre>".print_r($object, TRUE)."</pre>";
}
function mm_theme(){
return array(
'my_newsletter' => array(
'template' => 'my_newsletter',
'arguments' => array('node' => NULL)
)
);
}
We also needed to amend the mimemail.inc file - see - http://drupal.org/node/779646.
I hope this helps - good luck ....
-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de
Malls and More
Template overrides not working
Hi,
I'm putting simplenews-newsletter-body.tpl.php and simplenews-newsletter-footer.tpl.php in my site's theme folder but they are not being used theme the newsletters... what am I doing wrong?
I also have the Simplenews Template module installed. Do I have to remove it?
- V
_
SN Template is off and for our set-up we needed the module described above.
Contemplate module is also off / not used.
-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de
Malls and More
This might help with new documentation
You might want to take a look at this thread:
http://drupal.org/node/712744
You're welcome to use my code, which took many hours to figure out due to the lack of documentation and the differences between D5 and D6. I would love to know how to create in D6 the editing template described above for D5. But I never got that far. I would also like to be able to control where page breaks occur in a printer friendly version. But because my editing template only includes a series of select lists I do not know where the breaks naturally occur until the final newsletter is output.
Put your templates in the admin theme
Hi Victor,
You have to put the simplenews templates in your admin theme in order to work.
If you are using the latest mimemail module, then you have to copy the mimemail-message.tpl.php and put it in your site / custom theme.
Hopes this helps:)
Greetings,
Mirjam
Header Template?
Question - what about a header template?
Do I just need to put a simplenews-newsletter-header.tpl in the admin theme folder?
Or do I need to use include php in the simplenews-newsletter-body.tpl?
Also, has anyone posted a full example with templates of a Drupal Simple Newsletter anywhere? I've been looking but haven't found any.
Another question - if I wanted a two column layout with a header and footer how would one go about that? The only way I can get it to work is handcoding all the tables from scratch. Is that the only way? So basically I've been doing the newsletter in a text editor and then pasting the code in the body section of the Newsletter node. Takes some time.
Thanks!
This is a link to the
This is a link to the newsletter I created using simplenews. The code snippets you need are above.
http://www.spjdc.org/node/13759
This is a 2 column layout. I used a table, also described above. The nameplate is included in the bod.tpl.php file. I created a footer as well. which has its own template file. there is no separate header file. I used the method described in the original post re using a table to create a newsletter and my templates use the TID of the newletter to differentiate them from the stock templates.
There are many newsletter templates on the web that use tables. Find one you like and modify it to include your nameplate and the elements you need, i.e. TOC, contact, subsribe, etc. To make it easy the template for my newsletter follows.
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Dateline Template/title>
<?php
// $Id: simplenews-newsletter-body.tpl.php,v 1.1.2.4 2009/01/02 11:59:33 sutharsan Exp $
/**
* @file
* Default theme implementation to format the simplenews newsletter body.
*
* Copy this file in your theme directory to create a custom themed body.
* Rename it to simplenews-newsletter-body--<tid>.tpl.php to override it for a
* newsletter using the newsletter term's id.
*
* Available variables:
* - node: Newsletter node object
* - $body: Newsletter body (formatted as plain text or HTML)
* - $title: Node title
* - $language: Language object
*
* @see template_preprocess_simplenews_newsletter_body()
*/
$issue_date = $node->field_nl_issue_date[0]['view'];
$story1 = $node->field_nl_story_1[0]['nid'];
$story1 = node_load($story1);
if ($node->field_nl_story_2[0]['nid'] != '') {
$story2 = $node->field_nl_story_2[0]['nid'];
$story2 = node_load($story2);
}
if ($node->field_nl_story_3[0]['nid'] != '') {
$story3 = $node->field_nl_story_3[0]['nid'];
$story3 = node_load($story3);
}
if ($node->field_nl_story_4[0]['nid'] != '') {
$story4 = $node->field_nl_story_4[0]['nid'];
$story4 = node_load($story4);
}
if ($node->field_nl_story_5[0]['nid'] != '') {
$story5 = $node->field_nl_story_5[0]['nid'];
$story5 = node_load($story5);
}
if ($node->field_nl_story_6[0]['nid'] != '') {
$story6 = $node->field_nl_story_6[0]['nid'];
$story6 = node_load($story6);
}
if ($node->field_nl_story_7[0]['nid'] != '') {
$story7 = $node->field_nl_story_7[0]['nid'];
$story7 = node_load($story7);
}
if ($node->field_nl_story_8[0]['nid'] != '') {
$story8 = $node->field_nl_story_8[0]['nid'];
$story8 = node_load($story8);
}
if ($node->field_nl_story_9[0]['nid'] != '') {
$story9 = $node->field_nl_story_9[0]['nid'];
$story9 = node_load($story9);
}
if ($node->field_nl_story_10[0]['nid'] != '') {
$story10 = $node->field_nl_story_10[0]['nid'];
$story10 = node_load($story10);
}
if ($node->field_nl_story_11[0]['nid'] != '') {
$story11 = $node->field_nl_story_11[0]['nid'];
$story11 = node_load($story11);
}
if ($node->field_nl_story_12[0]['nid'] != '') {
$story12 = $node->field_nl_story_12[0]['nid'];
$story12 = node_load($story12);
}
print_r($node->field_nl_story_1[0]['view']);
?>
<style type="text/css" media="screen">
body {
background-color: #ffffff;
margin: 0;
padding: 0;
}
a img {
border: none;
}
a {
border: none;
}
.centeredimage {
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
text-align: center;
}
td.permission {
padding: 30px 0 10px 0;
}
.permission {
font-family: 'Times New Roman';
font-size: 12px;
color: #666666;
padding: 4px 0 4px 0;
}
.permission a {
color: #333333;
}
.permission p {
margin: 0 0 4px 0;
}
.header {
background-color: #ffffff;
}
.header h1 {
font-family: Franklin Gothic;
font-size: 32px;
font-weight: normal;
color: #bfbfbf;
display: inline;
text-align: left;
}
.date h3 {
font-family: 'Franklin Gothic';
font-size: 14px;
color: #bfbfbf;
font-weight: normal;
text-align: center;
display: inline;
font-style: italic;
}
.body {
background-color: #ffffff;
}
td.sidebar {
padding: 22px 10px 10px 10px;
align: center;
}
.sidebar h2 {
font-family: 'Franklin Gothic';
font-size: 18px;
font-weight: bold;
color: #808080;
margin: 6px 4px 6px 4px;
padding: 0;
text-align: center;
}
.sidebar h2.issue {
color: #000000;
margin: 0 0 10px 10px;
}
.sidebar ul {
font-family: "Times New Roman';
font-size: 14px;
text-decoration: none;
color: #2679b9;
margin: 0 0 2px 5px;
padding: 0;
text-align: left;
}
.sidebar ul a {
font-family: 'Times New Roman';
font-size: 14px;
color: #2679b9;
font-style: italic;
}
.sidebar ul li {
margin: 0 0 10px 0;
}
.sidebar p {
font-family: 'Times New Roman';
font-size: 14px;
color: #5f5f5f;
padding: 0;
margin: 0 0 10px 0;
text-align: center;
}
td.sidebg {
background-color: #f1f1f1;
padding: 10px 16px 10px 16px;
}
td.mainbar {
border-left: solid 2px #ededed;
padding: 22px 14px 0 14px;
}
.mainbar p {
font-family:'Times New Roman';
font-size: 14px;
color: #333333;
margin: 0 0 10px 0;
text-align: left;
}
.mainbar p.first {
margin-top: 10px;
}
.mainbar h2 {
font-family: 'Franklin Gothic';
font-size: 24px;
color: #000000;
margin: 1em 0 16px 0;
text-align: left;
}
.mainbar h2 a {
font-family: 'Franklin Gothic';
font-size: 24px;
color: #000000;
text-decoration: none;
font-style: normal;
}
.mainbar a {
font-family: 'Times New Roman';
font-size: 14px;
color: #2679b9;
font-style: italic;
}
.mainbar a.center {
font-size: 14px;
text-align: center;
display: block;
color: #999999;
padding: 8px 0 12px 0;
text-decoration: none;
}
.mainbar img.inline {
border: 1px solid #dedede;
padding: 4px;
}
td.footer {
padding: 0 0 10px 0;
border-top: 2px solid #ededed;
}
.footer p {
color: #a1a1a1;
font-size: 14px;
margin: 0;
padding: 0;
}
.footer p.first {
margin: 14px 0 0 0;
}
.footer a {
font-family: 'Times New Roman';
font-size: 14px;
color: #2679b9;
}
</style>
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td align="center">
<table width="600" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan=2 align="center" class="permission">
<p>You're receiving this newsletter because you are a member of the D.C. Professional Chapter<br>or you created a user account on the Chapter web site.</p>
</td>
</tr>
<div class="header">
<tr>
<td height="53" bgcolor="blue" width="520" valign="middle" style="font-family: Times New Roman; font-size: 15px; color: white; font-weight: bolder; text-align: center;">Washington, D.C., Professional Chapter, Society of Professional Journalists</td>
<td height="53" bgcolor="#ffffff" width="80" valign="middle" style="text-align: center; border: 1px solid blue;"><strong><?php print $issue_date; ?></strong></td>
</tr>
<tr>
<td height="110" align="center" width="600" colspan=2><img src="http://www.mysite.org/sites/all/themes/my_theme/dl_nameplate.gif"></td>
</tr>
</div><!-- #header -->
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center">
<table width="600" cellspacing="0" cellpadding="0" class="body">
<tr>
<td valign="top" width="180" class="sidebar" style="border-right: 1px solid blue;">
<h2>In this issue</h2>
<ul><?php
for ($i=0; $i<=9; $i++) {
$story = "story" . $i;
$story = $$story;
if ($story->title != '') {
print '<li>' . $story->title . '</li>';
}
}
?></ul>
<div class="centeredimage"><img src='http://www.mysite.org/sites/all/themes/my_theme/images/bg-bar.png' width='168' height='10' style="padding-top: 20px;" /></div>
<h2>Forward this email</h2>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>Do you know someone who might be interested in receiving Dateline?</p>
<?php
if((arg(0)=='node')&&(is_numeric(arg(1)))){
$nid=arg(1);
}
?>
<forwardtoafriend><a href="mailto:?subject=I%20think%20Dateline%20will%20interest%20you&body=http://www.spjdc.org/node/<?php print $nid; ?>">
<img src="http://www.mysite.org/sites/all/themes/my_theme/images/forward.gif" width="168" height="42" alt="Forward"></forwardtoafriend>
</td>
</tr>
</table>
<div class="centeredimage"><img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/bg-bar.png" width="168" height="10" alt="Small Hr" style="padding-top: 20px;"></div>
<h2>Unsubscribe</h2>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>You're receiving Dateline because you are a member of the D.C. Pro Chapter or you subscribed at the Chapter web site.</p>
<unsubscribe><a href="http://www.mysite.org/newsletter/confirm/remove/f767deaf381t77"><img src="http://www.mystie.org/sites/all/themes/my_theme/images/unsubscribe.gif" width="168" height="42" alt="Unsubscribe"></unsubscribe>
</td>
</tr>
</table>
<div class="centeredimage"><img src="http://www.mysite.org/sites/all/themes/my_theme/images/bg-bar.png" width="168" height="10" alt="Small Hr" style="padding-top: 20px; align: center;"></div>
<h2>Contact Us</h2>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>P.O. Box 19555<br />Washington, D.C. 20036</p>
<a href="mailto:webmaster@mysite.org"><img src="http://www.mysite.org/sites/all/themes/my_theme/images/email.gif" width="168" height="42" alt="Email"></a>
</td>
</tr>
</table>
</td>
<td align="left" valign="top" width="387">
<div class="mainbar">
<?php
print '<h2>'.$story0->title.'</h2>';
if ($story0->author != '') {
print $story0->content['field_author_name_uid']['view'];
}
print '<p>'.$story0->body.'</p>';
?>
<?php if ($story1 != '') {
print '<h2>'.$story1->title.'</h2>';
if ($story1->author != '') {
print $story1->content['field_author_name_uid']['view'];
}
print '<p>'.$story1->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story2 != '') {
print '<h2>'.$story2->title.'</h2>';
if ($story2->author != '') {
print $story2->content['field_author_name_uid']['view'];
}
print '<p>'.$story2->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story3 != '') {
print '<h2>'.$story3->title.'</h2>';
if ($story3->author != '') {
print $story3->content['field_author_name_uid']['view'];
}
print '<p>'.$story3->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story4 != '') {
print '<h2>'.$story4->title.'</h2>';
if ($story4->author != '') {
print $story4->content['field_author_name_uid']['view'];
}
print '<p>'.$story4->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story5 != '') {
print '<h2>'.$story5->title.'</h2>';
if ($story5->author != '') {
print $story5->content['field_author_name_uid']['view'];
}
print '<p>'.$story5->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story6 != '') {
print '<h2>'.$story6->title.'</h2>';
if ($story6->author != '') {
print $story6->content['field_author_name_uid']['view'];
}
print '<p>'.$story6->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story7 != '') {
print '<h2>'.$story7->title.'</h2>';
if ($story7->author != '') {
print $story7->content['field_author_name_uid']['view'];
}
print '<p>'.$story7->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story8 != '') {
print '<h2>'.$story8->title.'</h2>';
if ($story8->author != '') {
print $story8->content['field_author_name_uid']['view'];
}
print '<p>'.$story8->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
<?php if ($story9 != '') {
print '<h2>'.$story9->title.'</h2>';
if ($story9->author != '') {
print $story9->content['field_author_name_uid']['view'];
}
print '<p>'.$story9->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
?>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
The footer code is
<?php
// $Id: simplenews-newsletter-footer.tpl.php,v 1.1.2.4 2009/01/02 11:59:33 sutharsan Exp $
/**
* @file
* 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:
* - !confirm_unsubscribe_url: unsubscribe url to be used as link
* for more tokens: see simplenews_mail_tokens()
*
* @see template_preprocess_simplenews_newsletter_footer()
*/
$unsubscribe_text = "To unsubscribe go to http://www.spjdc.org/newsletter/confirm/remove/f767deaf381t77.";
$test_message = "This is a test version of Dateline.";
?>
<?php if ($format == 'html'): ?>
<table width="600" align="middle" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer">
<p class="first"><span style="color: #000000;">© 2010, D.C. Professional Chapter, Society of Professional Journalists</span>.</p>
<p><forwardtoafriend><a href="mailto:?subject=I%20think%20Dateline%20will%20interest%20you&body=http://www.spjdc.org/node/<?php print $nid; ?>">Forward this email to a friend</forwardtoafriend>. Not interested anymore? <unsubscribe><a href="http://www.spjdc.org/newsletter/confirm/remove/f767deaf381t77">Unsubscribe.</unsubscribe></p>
<p><?php print print_mail_insert_link(); ?></p>
</td>
</tr>
</table>
<?php else: ?>
<?php print $unsubscribe_text ?>
<?php endif ?>
<?php if ($key == 'test'): ?>
- - - <?php print $test_message ?> - - -
<?php endif ?>
Ok, thanks!! Thanks for the
Ok, thanks!!
Thanks for the example.
Looks great!
When I looked back this
When I looked back this morning I discovered that I gave the wrong version of the body.tpl.php file. The following is more efficient and much less code because it uses a look to format the stories.
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Dateline Template/title>
<?php
// $Id: simplenews-newsletter-body.tpl.php,v 1.1.2.4 2009/01/02 11:59:33 sutharsan Exp $
/**
* @file
* Default theme implementation to format the simplenews newsletter body.
*
* Copy this file in your theme directory to create a custom themed body.
* Rename it to simplenews-newsletter-body--<tid>.tpl.php to override it for a
* newsletter using the newsletter term's id.
*
* Available variables:
* - node: Newsletter node object
* - $body: Newsletter body (formatted as plain text or HTML)
* - $title: Node title
* - $language: Language object
*
* @see template_preprocess_simplenews_newsletter_body()
*/
$issue_date = $node->field_nl_issue_date[0]['view'];
$story1 = $node->field_nl_story_1[0]['nid'];
$story1 = node_load($story1);
if ($node->field_nl_story_2[0]['nid'] != '') {
$story2 = $node->field_nl_story_2[0]['nid'];
$story2 = node_load($story2);
}
if ($node->field_nl_story_3[0]['nid'] != '') {
$story3 = $node->field_nl_story_3[0]['nid'];
$story3 = node_load($story3);
}
if ($node->field_nl_story_4[0]['nid'] != '') {
$story4 = $node->field_nl_story_4[0]['nid'];
$story4 = node_load($story4);
}
if ($node->field_nl_story_5[0]['nid'] != '') {
$story5 = $node->field_nl_story_5[0]['nid'];
$story5 = node_load($story5);
}
if ($node->field_nl_story_6[0]['nid'] != '') {
$story6 = $node->field_nl_story_6[0]['nid'];
$story6 = node_load($story6);
}
if ($node->field_nl_story_7[0]['nid'] != '') {
$story7 = $node->field_nl_story_7[0]['nid'];
$story7 = node_load($story7);
}
if ($node->field_nl_story_8[0]['nid'] != '') {
$story8 = $node->field_nl_story_8[0]['nid'];
$story8 = node_load($story8);
}
if ($node->field_nl_story_9[0]['nid'] != '') {
$story9 = $node->field_nl_story_9[0]['nid'];
$story9 = node_load($story9);
}
if ($node->field_nl_story_10[0]['nid'] != '') {
$story10 = $node->field_nl_story_10[0]['nid'];
$story10 = node_load($story10);
}
if ($node->field_nl_story_11[0]['nid'] != '') {
$story11 = $node->field_nl_story_11[0]['nid'];
$story11 = node_load($story11);
}
if ($node->field_nl_story_12[0]['nid'] != '') {
$story12 = $node->field_nl_story_12[0]['nid'];
$story12 = node_load($story12);
}
?>
<style type="text/css" media="screen">
body {
background-color: #ffffff;
margin: 0;
padding: 0;
}
a img {
border: none;
}
a {
border: none;
}
td.permission {
padding: 30px 0 10px 0;
}
.permission {
font-family: 'Times New Roman';
font-size: 12px;
color: #666666;
padding: 4px 0 4px 0;
}
.permission a {
color: #333333;
}
.permission p {
margin: 0 0 4px 0;
}
.header {
background-color: #ffffff;
}
.body {
background-color: #ffffff;
}
td.sidebar {
padding: 0px;
align: center;
}
.sidebar h2 {
font-family: "Franklin Gothic";
font-size: 18px;
font-weight: bold;
color: #808080;
margin: 0;
padding: 0;
text-align: center;
}
.centeredimage {
margin: 0;
padding-bottom: 6px;
text-align: center;
}
.sidebar h2.issue {
color: #000000;
margin: 6px 0 10px 0px;
}
.sidebar ul {
font-family: "Times New Roman";
font-size: 14px;
font-style: normal;
font-weigh: bold;
list-style-type: none;
color: #2679b9;
margin: 3px 0 0px 0;
padding: 0;
text-align: left;
}
.sidebar ul a {
font-family: "Times New Roman";
font-weight: bold;
font-size: 14px;
color: #2679b9;
text-decoration: none;
}
.sidebar ul li {
margin: 4px 0 4px 0;
}
.sidebar p {
font-family: "Times New Roman";
font-size: 14px;
color: #5f5f5f;
padding: 5px;
margin: 0;
text-align: center;
}
td.sidebg {
background-color: #f1f1f1;
margin: 5px;
padding: 0;
}
td.mainbar {
border-left: solid 2px #ededed;
padding: 5px 10px 0 10px;
}
.mainbar p {
font-family: "Times New Roman";
font-size: 16px;
color: #000000
margin: 0 0px 5px 0px;
text-align: left;
}
.mainbar p.first {
margin-top: 10px;
}
.mainbar h2 {
font-family: "Franklin Gothic";
font-size: 24px;
font-style: normal;
/* color: #000000; */
text-decoration: none;
margin: 0px 0px 5px 0px;
text-align: left;
}
.mainbar h2 a {
font-family: "Franklin Gothic";
font-size: 24px;
color: #000000;
text-decoration: none;
}
.mainbar a {
font-family: "Times New Roman";
font-size: 14px;
color: #2679b9;
text-decoration: none;
font-style: italic;
}
.mainbar a.center {
font-size: 14px;
text-align: center;
display: block;
color: #999999;
padding: 8px 0 12px 0;
text-decoration: none;
}
.mainbar a.readmore {
margin-left: 250px;
}
.mainbar img.inline {
border: none;
padding: 4px;
}
.mainbar .caption, .image-caption, .image-caption-container {
font-family: Arial;
font-size: 12px;
font-weight: bold;
text-align: center;
margin: 2px 0 0 0;
color: 000000;
text-align: center;
}
td.footer {
padding: 0 0 10px 0;
border-top: 2px solid #ededed;
align: center;
}
.footer p {
color: #a1a1a1;
font-size: 14px;
margin: 0;
padding: 0;
text-align: center;
}
.footer p.first {
margin: 14px 0 0 0;
}
.footer a {
font-family: 'Times New Roman';
font-size: 14px;
color: #2679b9;
}
</style>
</head>
<body>
<table width="90%" align="middle" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td>
<table width="620" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan=2 align="center" class="permission">
<p>You're receiving this newsletter because you are a member of the D.C. Professional Chapter<br>or you created a user account on the Chapter web site.</p>
<p>If you cannot read this email <a href="http://www.spjdc.org/node/<?php print $node->nid; ?>" target="_blank">click here.</a></p>
<p><?php print print_insert_link(); ?></p>
</td>
</tr>
<div class="header">
<tr>
<td height="53" bgcolor="blue" border="1px solid blue" width="520" valign="middle" style="font-family: Times New Roman; font-size: 15px; color: white; font-weight: bolder; text-align: center;">Washington, D.C., Professional Chapter, Society of Professional Journalists</td>
<td height="53" bgcolor="#ffffff" width="90" valign="middle" style="text-align: center; border: 1px solid blue;"><strong><?php print $issue_date; ?></strong></td>
</tr>
<tr>
<td height="110" align="center" width="620" colspan=2><img src="http://www.spjdc.org/sites/all/themes/spj_garland/dl_nameplate.gif" width=600></td>
</tr>
</div><!-- #header -->
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table width="620" align="center" cellspacing="0" cellpadding="10px">
<tr>
<td width="200" valign="top" style="border-right: 2px solid blue; text-aligh: center;"><div class="sidebar">
<h2>In this issue</h2>
<ul><?php
for ($i=1; $i<=12; $i++) {
$story = "story" . $i;
$story = $$story;
if ($story->title != '') {
print "<li><a href='#story" . $i . "'>" . $story->title . "</a></li>";
}
}
?></ul>
<div class="centeredimage"><img src='http://www.spjdc.org/sites/all/themes/spj_garland/images/bg-bar.png' width='168' height='10' style="padding-top: 20px;" /></div>
<h2>Forward this email</h2>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>Do you know someone who might be interested in receiving Dateline?</p>
<?php
if((arg(0)=='node')&&(is_numeric(arg(1)))){
$nid=arg(1);
}
?>
<forwardtoafriend><a href="mailto:?subject=I%20think%20Dateline%20will%20interest%20you&body=http://www.spjdc.org/node/<?php print $nid; ?>">
<img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/forward.gif" width="168" height="42" alt="Forward"></forwardtoafriend>
</td>
</tr>
</table>
<div class="centeredimage"><img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/bg-bar.png" width="168" height="10" alt="Small Hr" style="padding-top: 20px;"></div>
<h2>Unsubscribe</h2>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>You're receiving Dateline because you are a member of the D.C. Pro Chapter or you subscribed at the Chapter web site.</p>
<unsubscribe><a href="http://www.spjdc.org/newsletter/confirm/remove/f767deaf381t77"><img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/unsubscribe.gif" width="168" height="42" alt="Unsubscribe"></unsubscribe>
</td>
</tr>
</table>
<div class="centeredimage"><img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/bg-bar.png" width="168" height="10" alt="Small Hr" style="padding-top: 20px; align: center;"></div>
<h2>Contact us</h2>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="sidebg" align="center">
<p>P.O. Box 19555<br />Washington, D.C. 20036</p>
<a href="mailto:webmaster@spjdc.org"><img src="http://www.spjdc.org/sites/all/themes/spj_garland/images/email.gif" width="168" height="42" alt="Email"></a>
</td>
</tr>
</table>
</div></td>
<td width="400" align="center" valign="top"><div class="mainbar">
<?php
if ($node->field_nl_teaserversion[0]['value'] == '1') {
for ($i=1; $i<=12; $i++) {
$story = "story" . $i;
$story = $$story;
$storyid = $story->nid;
if ($story->title != '') {
print "<a href='http://www.spjdc.org/node/" . $storyid . "' target='_blank' name='story".$i."'><h2>" . $story->title . "</h2></a>";
if (strlen($story->teaser) < strlen($story->body)) {
print $story->teaser;
print "<a class='readmore' href='http://www.spjdc.org/node/" . $storyid . "' target='_blank'>... Read more.</a>";
}
else {
print '<p>'.$story->teaser.'</p>';
}
print '<a href="#top" class="center">Back to top^</a>';
}
}
}
else {
for ($i=1; $i<=12; $i++) {
$story = "story" . $i;
$story = $$story;
if ($story->title != '') {
print "<a name='story" . $i . "'><h2>" . $story->title . "</h2></a>";
print '<p>'.$story->body.'</p>';
print '<a href="#top" class="center">Back to top^</a>';
}
}
}
?>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Dumb question maybe, but I
Dumb question maybe, but I haven't been able to find the answer -
Where the heck do you find the tid of the newsletter?
I've been trying to theme it, but I can't seem to get a set width. Seems to be always 100%.
tid is taxonomy related
and you need to look under taxonomy - there is the typical Drupal problem (well just look at PayPal etc.) the terminology is not consistent. You may not find tid when you search for example under Views.
Look for Taxonomy ID or Term ID. The tid is coming from the use of taxonomy to allow for different kinds (types, categories) of newsletters.
I setup an admin View for the newsletters showing me - things like:
Date Headline - Main Story 1 - Main Story 2 - ..... - Sent status - Nid - Term ID - Published - Post date - ....
-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de
Malls and More
When you install simplenews a
When you install simplenews a taxonomy list is created for newsletters. This makes it possible to create several different newsletters with different subscription lists, templates, etc. List the terms in the Newsletter taxonomy and click the term representing the name of your newsletter. The URL of that term will end .../term/term no. Term no. is the tid of that newsletter.
In the latest update
In the latest update (9/30/2010) are the instructions for creating the UI amended for D6? The previous version o fht UI instructions didn't work D6.
Dunno
Dunno about Drupal, been working with it quite a time, used lot of modules, but the more I see things like this, the more I think this is a CMS for people with a lot of free time, nothing else to do, or for professionals who work with it on a regular basis.
That so sums up my opinion of
That so sums up my opinion of Drupal, if you have fairly basic cms needs, i.e. allowing your users to add their content dynamically through the browser, simple navigation, maybe a couple of views to display your content in a clean, professional way, and perhaps a couple of other features that aren't too specific, then Drupal may indeed be the perfect tool for you. If not, you better either know it inside out or have a ton of free time on your hands!
.
I think you should both, y jm132 and Jane_dev, should be aware that you are judging Drupal by a module that is third party.
Of course, if one needs to do a simple project Drupal might easily be overkill. On the other hand for people like myself, who only made their way into Drupal and nothing else, Drupal is the solution I use for more complex task as well as simple sites.
I think your comments are understandable, but everyone has to be aware that Drupal is a powerful CMS tool and there is a reason it is widely used and growing. But you wouldn't take a truck to a drive-through burger place ......
-----------
Good luck .....
... more recent results of trying Drupal just once are -
www.native-power.de
Malls and More
Tryitonce, I think you make
Tryitonce, I think you make some very valid points and I absolutely want to acknowledge that. Furthermore, I think for the sake of accuracy, instead of saying "my opinion of Drupal" I should really say something along the lines of "my opinion based on my experience with Drupal and various modules contributed by the community..." just to be sure people understand I am not limiting my judgement to the CMS itself, but also to the various components that might come along with it.
I should also mention, I am a themer, which means that contrary to, say, a developer, I will not be delving into Drupal core code to try to customize it nor will I be developing my own custom modules. Therefore, I rely very heavily on third-party modules (with only minor tweaking on my end to suit my clients' needs) to make my Drupal sites work.
However, at this point, after over a year of working on Drupal sites for various clients, I think I can safely say I would now only accept contracts that call for Drupal theming (I really just mean XHTML/CSS + info file), core Drupal functionality and very stable, extensively developed modules such as CCK (for Drupal 6, since it has been moved into core in Drupal 7 anyway) or Views for example.
Here is the thing though, at this point in time in a professional environment, who really only needs to send out newsletters with very little formatting options? Who wants to send out a newsletter based on the entire site's content? I finally got my newsletter to behave the way I wanted it to, but I added several modules to Simplenews in order to get the kind of functionality I needed to meet my client's expectations. And I understand this is a third-party issue, but this kind of thing tends to happen a lot with Drupal modules: following installation and configuration, you realize it's somehow lacking or buggy. Also, I would imagine -- but I could be wrong -- that if developers are going to develop their own modules from scratch, wouldn't that either take quite a bit of time or at least good knowledge of the CMS itself, which is kind of the point JM132 was making?
I understand Drupal has a lot going for it, it certainly wouldn't be used as extensively as it is if it didn't offer huge advantages. But maybe, for the most part, it's just not for the basic designer/themer and more for the seasoned developer...?
Make it simple
Is there anyone how could explain this article in a simple and strait way.
I´m having a hard time to output and html mail layout design that I would like to be the base design for my newsletters. I've been trying for more then a week but without success
I tried to follow this article, but I lost my self in the way, because at once they refer to "htmlmail" being a better alternative do "mimemail". but then there is a reference do use mimemail.
Can anyone help me.
I really need to be capable to send nicely formatted newsletters with content that is in the site.
When I wrote the stuff above
When I wrote the stuff above and put my template in this thread HTMLMail was very different from what it is now. In fact, I have been unable to figure out how to use the new version of HTMLMail and mail system. I find the instructions incomprehensible. So I'd suggest you go back to the last version, which I believe is 6.x.1.13 or so. One of the confusing things about the newer version, 6.x.2.x, is that you can have an htmlmail tpl.php file for each module. I don't know how that works with the simplenews tpl.php files.