Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On D6 this is something like:
// Set some content into the node body.
$node->body = 'content';
+ // Clear the teaser.
+ $node->teaser = '';
Comments
Comment #1
BerdirWe have that?
Comment #2
joachim CreditAttribution: joachim commentedThe 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.
Comment #3
Berdir$node->teaser does not exist in Drupal 7 :)
Comment #4
joachim CreditAttribution: joachim commentedD6 then :)
Comment #5
joachim CreditAttribution: joachim commented- #1504548 by joachim: Added example of setting the node body to documentation for hook_simplenews_scheduler_cloned_node_alter().