Hi there,

I'm trying to get simplenews content selection to pull through CCK images into the body of newsletters... I have set the display fields for the content type to Image, but this does not seem to be working.

Any help would be greatly appreciated.

Thanks
Nic

Comments

NicParry’s picture

ok so I think I figured it out... I put the following function(modified from the scs.theme.inc) in my themes template.php file

/**
 * Each selected node goes true this function to create a nice body
 */
function phptemplate_scs_node_output($node) {
  $output = '';
  
  $output = '<div id="node_' . $node->nid . '">';
    $output .= '<img src="' . $node->field_thumbnail_image[0]['filepath'] . '"/>';      //fild_thumbnail_image being the name of the image field I want included in the newsletter
    $output .= '<h1>' . $node->title . '</h1>';
    $output .= '<p>' . node_teaser($node->body) . '</p>';
    $output .= '<p>' . l(t('Read more'), 'node/' . $node->nid) . '</p>';
  $output .= '</div>';
  
  return $output;
}

This is my first time messing around with overiding functions, so is it an acceptable solution?

dtrdewaele’s picture

Status: Active » Fixed

That's indeed the way to do it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.