Download & Extend

check for simplenews.css in theme

Project:Simplenews
Version:6.x-1.0-rc6
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
simplenewscss.patch594 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» closed (won't fix)

Simplenews relies on other modules to send HTML emails. Therefore there is no place for css support in Simplenews.

nobody click here