How to user the gallery formatter settings in a display suite code field?

Created on 28 January 2013, almost 12 years ago
Updated 13 November 2024, 3 days ago

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?

πŸ’¬ Support request
Status

Closed: outdated

Version

1.3

Component

Miscellaneous

Created by

πŸ‡§πŸ‡ͺBelgium zylootino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    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

Production build 0.71.5 2024