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 of the related page I use the following:

        $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?

Comments

astonvictor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks