Can I embed nodes content in a newsletter without doing a copy paste?

It will be great if I could have a node variable something like:

title: bla bla

body:
This week winning story is: %(/node/1809)
This week winning user is: %(/user/300)

The module will automatically embed the content of the nodes inside the newsletter body and add a link to the original node.

Is it possible?

Comments

sutharsan’s picture

Status: Active » Closed (won't fix)

Does a filter exist doing this? If so, you can apply it to Simplenews node body.
This will not be a Simplenews function.

tyswan’s picture

Ty This for /node/1809:

// We save and restore the real path & title for the page
$q = $_GET['q'];
$title = drupal_get_title();
// Change event to the path you want, this is the part after q= (or after the base path if you have clean URLs enabled)
// The call to drupal_get_normal() allows for using path aliases.
$_GET['q'] = drupal_get_normal_path('node/1809');
// Get and print the output for just the content associated with the path
// If you see the complete page within a page it means the path callback is probably calling theme('page', ....)
print menu_execute_active_handler();
// Restore the real path & title for the page
drupal_set_title($title);
$_GET['q'] = $q;

(omit the leading slash in the path for some reason)

I found I had problems with the breadcrumbs. If you do too, then insert this code:
$crumbs = drupal_get_breadcrumb();
after saving the title,
and
drupal_set_breadcrumb($crumbs);
after restoring the title.

From: http://drupal.org/node/83431

It works for me, so I hope it helps you...

Cheers,
Tys.

dorien’s picture

What about the Insert View module!

hansrossel’s picture

Adding CCK nodereference fields to the Newslettter content type works for me.