Print field from reference of reference (node) I use the module "entity reference" and I ave "Inline Entity Form" in the node. The first reference has another reference inside. In total there are 3 nests, a grandfather, a father and son.
In node.tpl the first parent node how can I print a field of his nephew?

- Node.1
-- Ref. Node.2
--- Ref. Node.3


I want to print a Node.3 field's in Node.1

Thanks so much!
There is always more than one way to solve a problem in drupal.  How easy those ways are is up for debate, but they exist.

You could:


Make a view with those reference fields as relationships and a nid context filter that would recognize the Node.1 end of the relationships.  Set this view to have a block display, and A) put the block on the page with a context or B) summon the view to be rendered by name in your tpl. Or with the function views_embed_view
Make database fetches or entity field queries directly in your node.tpl.php.  This is uncouth, as such logic should not be put in the theme layer, but functional.
Forget about node.tpl.php entirely and do this in panels.  I'm pretty sure it supports using referenced fields.


The echo $view-&gt;render('block_view'); method would be my suggestion to you.  Views is a very powerful module, has built in theming overrides (and more if you want more tpls) and can do all sorts of rewrites and manipluations while laying things out for you.  Add the ability to conjure it's database bending powers from your tpl with just 6 lines of code, and it is stupendous.