2

I'm creating a custom template file for a specific content type. I'm printing most of values with

<?php print render($content['field_blabla']); ?>

As some of them didn't show up and they are not empty I tried

dpm($content);

Indeed they aren't in the array printed, but if try

$node = node_load($node->nid, NULL, TRUE);
dpm($node->field_blabla['und'][0]['value']);

I can see the value!

What's the problem? Why are they missing?

Thanks

1 Answer 1

4

Sounds like their field display settings are hidden, which is one reason it would not be in the $content renderable array.

Check the display settings for the applicable view mode for this content type on the "Manage Display" tab.

2
  • I have checked it, and it was ok for the default view, but not the "full content" tab... So I checked now again and found the problem! Thanks a lot! Jan 19, 2017 at 18:57
  • It would be Default by default if full content is not checked off for custom display settings.
    – Kevin
    Jan 19, 2017 at 18:57

Your Answer

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

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