node.tpl render field from referenced entity I have a node.tpl.php file where I need to output a field from an entity referenced via the entity module (a reference field). I have tried using:

print render($content['field_parent']['#items'][0]['entity']-&gt;field_main_image);


but nothing appears! I also tried this way:

$parent = node_load($node-&gt;field_parent['und'][0]['target_id']);
print render($parent-&gt;field_main_image);


I just would like to render() a related field just as I do with $content fields.

Any hints ?
Thank you
You can use https://www.drupal.org/project/inline_entity_display to do that with entity reference and field collection field.