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.
By mz906 on
is it possible to print the NODE BODY only?
as in no title, no image or CCK fields?
i'm using drupal 5.x and i've tried the following:
echo $node->body;
but this currently prints the body and all the cck field's
Comments
nevermind fonud it on
nevermind fonud it on another site, solution:
This helped me. Thanks.
This helped me. Thanks.
Thanks
Thanks, this helped me too !
Here is a more complete variation of your code
I actually wanted to print the body of a node by providing the node ID. Here is what I came up with:
It took me a while to put together these few lines of code. I hope that this will save someone else’s a little time down the road.
Thanks. I was able to use the
Thanks.
I was able to use the original code to populate a cck field with the body of a node in a Rules Action.
Very new to php.
How do I run that?
How to put that in practice?
how can I run this code in a onclick button event using javascript? print $node->content['body']['#value'];