Displaying a field of an entitiy reference In my Page content type there is an image field called gallery, and an Entity reference field refering to a related page.

I need to display the images contained in the gallery field of the related page.

I have created a Display Suite a code field. In the tokens I found [node:field-related-page:field_gallery] but it seems to be empty (it prints nothing).

I have used Devel's dpm() method to display $entity's content but it does the related page fields do not contain any info about the gallery (which makes sense as recursion could be an issue):
If you want to do it only in code, do a node_load($node-&gt;field_related_page['und']['0']['target_id']. If you want a view, use a relationship and show gallery field with the relationship.