I have a block I am trying to insert into the body field, catch is I want it to appear after the first two paragraphs. I tried using something similar to this in my node.tpl.php:
<?php $array = explode ("</p>", $content['body']); $array = $myBlock . $array; $content['body'] = implode("</p>", $array); ?> //Important: This code snippet needs to be inserted before <?php print $content['body']; ?>
This code does insert my block in the body field, but also overwrites all the content in the field.
I'm using Drupal 7.10, any help is appreciated.