I am using the gallery formatter module to format photo galleries.
To satisfy a requirement I need to create a Display Suite code field
that displays the list of pictures attached to a related node (attached through the Entity reference module).
The get the field_gallery
containing images of the related page I use the following in the code field:
<?php $relatedNode = node_load($entity->field_related_page['und']['0']['target_id']); $field = field_view_field('node', $relatedNode, 'field_gallery', array( 'label'=>'hidden')); echo drupal_render($field) ; ?>
However this only displays a raw list of images. I need this list of images to be fomatted by the gallery formatter.
The formatter should be passed to field_view_field() as an array (instead of array( 'label'=>'hidden')
) but how can I get the list of key->values that fill the array?