I have a Slideshow view which loads two fields, main images ('group multiple values' unchecked to create rows) and video ('hide if empty' checked). It takes these from one node which it gets from the nid argument.

The slideshow currently displays 13 images but each image also has a seperate instance of the video attached to it.

I've tried playing about with the views-slideshow.tpl.php file and I've also tried excluding the video from display then manipulating the view ovject from withing hook_views_prerender() and hook_preprocess_views_view(), all with no luck.

I just want the 13 unique images with the single instance of the video link added to the end, therefore creating 14 unique slides. Ideally I would want to add 2 or 3 videos so the solution needs to account for this.

  • basically you want a slide with 13 images and the last one is a video, right? Aug 20, 2012 at 8:33
  • are you using a slideshow plugin? if so which one? it's a bit confusing that the video turns up 13 times! what happens if you display the view in a flat unformatted list on a separate page/block Aug 20, 2012 at 8:45
  • At the moment i've looped through the view in views_pre_render and unset the video related keys from each row, then ive added these as an additional row on the end. It works except 1. I get an empty slide because views_pre_render goes through every view twice(why?!?) and 2. It's obviously no solution for multiple videos Aug 21, 2012 at 9:20
  • For the record 14 is blank, 15 is the video. It goes through ALL views on the site twice, not just this one. Aug 21, 2012 at 9:21

2 Answers 2


One of our Drupal Developers has written an article on the subject of creating Slideshows in Drupal using embedded Youtube Videos. Take a look, maybe it may help you to sole your problem. http://wearepropeople.com/blog/how-to-create-slideshows-with-embedded-youtube-videos-in-drupal-7

  • first tick exclude from display for video field
  • then create view tpl (check view -> edit > theme information for suggestion and markup
  • then manually include an <li></li> at just after loop
  • -inside <li></li> , echo the video field name, mostly its something like this $rows[0][VIDEOFIELDNAME]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.