On D6 this is something like:

  // Set some content into the node body.
   $node->body = 'content';
+  // Clear the teaser.
+  $node->teaser = '';

Comments

Berdir’s picture

Status: Active » Fixed

We have that?


/**
 * Alter the node object that was cloned from the template node before it gets saved.
 *
 * The node is passed as node object and therefore passed by reference. This hook
 * is for example usefull if you have fields in the template node that contain
 * information about data that should get rendered dynamically into the edition
 * node depenedent on the current schedule date.
 */
function hook_simplenews_scheduler_cloned_node_alter($node) {
  $node->title = 'Your newsletter from ' . REQUEST_TIME;
}

joachim’s picture

Status: Fixed » Active

The example of how to set body text is useful in addition, at least on D6, as I found that if you don't clear the teaser you get things in twice.

Berdir’s picture

$node->teaser does not exist in Drupal 7 :)

joachim’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev

D6 then :)

joachim’s picture

Status: Active » Fixed

- #1504548 by joachim: Added example of setting the node body to documentation for hook_simplenews_scheduler_cloned_node_alter().

Status: Fixed » Closed (fixed)

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