diff --git a/theme/galleria-container.tpl.php b/theme/galleria-container.tpl.php index a8e5690..253aa11 100644 --- a/theme/galleria-container.tpl.php +++ b/theme/galleria-container.tpl.php @@ -4,6 +4,4 @@ * Default output for a galleria node. */ ?> -
And this text will be on top of the image
'*/ ); } - else { - $options = array(); + + // If our $item is a "video" add this to the data array + elseif ($item['type'] == 'video') { + $data[] = array( + 'video' => file_create_url($item['uri']), + 'title' => $item['filename'], + ); } - $vars['items'][$delta] = array( - '#theme' => 'image_formatter', - '#item' => $item, - '#image_style' => $thumb_style, - '#path' => array( - 'path' => $normal_url, - 'options' => $options, - ), - ); } + + // Add "data" array to galleria option "dataSource" + $optionset->options['dataSource'] = $data; + + // Attach Galleria JavaScript + galleria_add_js($galleria_id, $optionset); } /**