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

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.

  • 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! – Ponzio Pilato Jan 19 '17 at 18:57
  • It would be Default by default if full content is not checked off for custom display settings. – Kevin Jan 19 '17 at 18:57

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.