within node template, i am trying to print a content type field value. usually I see the render function used to print the field value in the template e.g. render($content['field_name']). how do i just print the field value?

$content['field_name'][$lang][0]['value'] doesnt work

1 Answer 1


You can do it like this:

$lang = field_language('node', $node, 'field_name'); // gets field language

print $node->field_name[$lang][0]['value']; // prints field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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