Search code examples
drupal-7drupal-theming

How to show body and teaser in node--contentType.tpl.php


I'm themeing the node template for a particular content type. I want to access both the main body AND the summary (teaser). Currently, when I render the body as below, Drupal outputs only the body and not the summary.

As this is a full node page I want both the body and the summary to be rendered. I can't understand why this isn't clear as day, or am I be missing something about how teaser and body are supposed to work?

print render($content['body']);

Solution

  • This works.

    $body = field_get_items('node', $node, 'body');
    $teaser= $body[0]['safe_summary'];
    print $teaser;