I have followed the handbook to set up an html newsletter using tables. I can get all the static stuff in place. But for days I have tried to find a way to populate the body of the newsletter with stories, and have gotten no further than getting the headlines.

I added a nodereference field, field_nl_stories, that uses a view that filters on Published=yes, Type=blog entry, page, story, and Post Date < 45 days ago. Sort by Post Date, Display title, author, body. That gives me a select list in the node form. So far so good.

I then put into the node-simplenews-body.tpl.php a loop to go through the selected field_nl_stories entries. But the best result I have come up with is getting the headlines with

foreach ((array)$node->field_nl_stories as $item {
print content_format(field_nl_stories, $item).'
';
}

I cannot get the author or body fields to print, no matter what variation on this I try.

The other major problem with this method is I cannot control the order in which stories appear. They are, due to the view sort, presented by date descending. My alternative might be to set up a series of nodereference fields, i.e., field_nl_story1, field_nl_story2, ..., and then put them in a group. But until I find a way to print the author and body fields under the title that is just a dream.

Can anyone explain clearly for us non-pro site administrators how to do this. The current documentation assumes a level of knowledge above mine and, I suspect, many of us. It also is written mainly for D5.

Thanks

Comments

Sutharsan’s picture

Sutharsan’s picture

Status: Active » Closed (fixed)

No activity, closing issue.