How to use the gallery formatter settings in a display suite code field? 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:

&lt;?php 
    $relatedNode = node_load($entity-&gt;field_related_page['und']['0']['target_id']);
    $field = field_view_field('node', $relatedNode, 'field_gallery', array( 'label'=&gt;'hidden'));
    echo drupal_render($field) ;
?&gt;


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'=&gt;'hidden')) but how can I get the list of key->values that fill the array?
May I suggest field slideshow if you havent tried that already.  Field Slideshow 


  Provides a Slideshow formatter for Image fields, using JQuery Cycle
  plugin.
  
  Compared to Views slideshows, building the slideshow from multiple
  nodes, this module builds it from a single node, with a multi-valued
  Image/Media/Field Collection field.