drupal 7, page--node--mytype.tpl.php template. how to get node body html, as i have…
- User
drupal 7, page--node--mytype.tpl.php template. how to get node body html, as i have title by call $node->title etc
- Assistant
In Drupal 7, when you're working with a custom node template like
page--node--mytype.tpl.php, you typically have access to the entire node object. If you want to output the body content of the node, you can access it directly from the$nodeobject.The body field in Drupal 7 is a field with language support, so you'll need to ensure you're accessing it correctly. The body field is typically
field_body, but this can vary if the field has been renamed. Assuming you're using the standard body field, here's how you can access and print the body content:php