I embedded the SSP as a block view quite nicely, however I need to limit the maximum number of slides to six. The slideshow shows banks. I do I remove them so if there is only two images uploaded only two slides show?

I started to write a little recipe of how I embedded the slideshow. http://drupal.org/node/759152

Comments

Adam S’s picture

I changed view style from slideshow pro to unformatted. Here is the output in the block. I added the delta field. What is happening?


sites/default/files/slideshow/images/DSC03210.JPG
Images (field_slideshow_images) - delta:

sites/default/files/slideshow/images/DSC03212.JPG
Images (field_slideshow_images) - delta: 1

sites/default/files/slideshow/images/DSC03214.JPG
Images (field_slideshow_images) - delta: 2

sites/default/files/slideshow/images/DSC03215.JPG
Images (field_slideshow_images) - delta: 3

Images (field_slideshow_images) - delta: 4

Images (field_slideshow_images) - delta: 5

Adam S’s picture

I added the if ($image['filepath']) condition which removes the blank slides. This is in ssp_views.module.

if($field && !in_array($node->nid, $nodes_seen) && is_array($node->$field)) {
      foreach($node->$field as $image) {
  	 if ($image['filepath']) {
			$src = $base_path.$image['filepath'];
			$description = $image['data']['description'];
			$title = $image['data']['title'];
			$thumbnail = ssp_imagecache_generate('ssp_thumbnail', $image['filepath'], TRUE);
			if(is_array(file_validate_is_image($image))) {
				print '<img src="'. $src .'" title="'. $title .'" caption="'. $description .'" link="" target="_blank" pause="" tn="'.$thumbnail .'" vidpreview="" />' . "\n";
			}
        }

      }