i have a website in which i am building a custom node page: node--coupon.tpl.php in which i want to render the body field only for which i used

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

The result is shown as "BODY: this is my text".

but i want to use only 'this is my text' which is entered at the time of making a new custom content type of coupon.

is it possible to do so anyhow?


If you want to hide the label, go to Admin > Structure > Content types > Coupon > Manage display.

  • thx for the help
    – abhishek
    Mar 11 '16 at 14:49

Using render function will always render the whole stuff. Print the exact variable that contains the body content. If you are aware of Devel module, it will hep you to find the exact variable.

For example, something like print $node->body['und'][0]['value']; will do the stuff.Sure it will include the html tags ( if made entry ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.