I think a check for a simplenews.css file in the theme would be handy, that one could override css sessions for the HTML email sent.
I solved it by using my own function in the template.php
function phptemplate_preprocess_simplenews_newsletter_body(&$variables) {
if (file_exists(path_to_theme()."/simplenews.css")) drupal_add_css(path_to_theme()."/simplenews.css", 'theme');
}
But I think it would be a simple and very userfriendly addition to simplenews functionality if that line was in the simplenews preprocess function already..
function template_preprocess_simplenews_newsletter_body(&$variables) {
if (file_exists(path_to_theme()."/simplenews.css")) drupal_add_css(path_to_theme()."/simplenews.css", 'theme');
$variables['title'] = check_plain($variables['node']->title);
$variables['body'] = $variables['node']->body;
}
If someone wants to override the css, it is very easy to do. If not, no extra css is added.
| Comment | File | Size | Author |
|---|---|---|---|
| simplenewscss.patch | 594 bytes | catorghans |
Comments
Comment #1
sutharsan commentedSimplenews relies on other modules to send HTML emails. Therefore there is no place for css support in Simplenews.