By lalaalaaa on
I'm using node_load to display the body content of a node-referenced node on another node.
$artistid = $node->field_event_artist[0]['nid']; // get the node referenced node
$artistnode = node_load($artistid); // load the node
$bio = $artistnode->body; // get the node body
echo $bio;
When the bio displays, it loses the set input format (that automatically adds paragraphs and links), and just returns unformatted text.
Is there anything I can do to return the text WITH the formatting?
Thanks for any help!
Comments
Maybe take a look at
Maybe take a look at http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_re... and related functions.
Use check_markup to get formatted node body
You need to do
$bio = check_markup($artistnode->body, $artistnode->format, FALSE);The Oatmeal: 8 Websites You Need to Stop Building