I am developing a slideshow that shows nodes with views_slideshows embedded in them with views_attach. Having some issues with the 2.x branch and the singleframe plugin so trying out the 3.x branch. I see that if you have a node row type that you lose the pager option. I gather this is because it uses fields for pagers and with nodes, you have not fields for the pagers.

My question is, as you can now make your own pagers, if I made one, could I get around the fields issue, or should am best to just head down a different avenue so to speak. Thanks,

Comments

Title:No pager available for 'node' row typeMake views slideshow compatible with node displays.
Version:6.x-3.x-dev» 7.x-3.x-dev

Node display currently has issues in 3.x. I'll need to look into this further.

I ended up making what I needed out of the 2.x branch. The 3.x branch does look promising and will look at it for future projects. Thanks.

Category:support» feature

I'm definitely looking for this functionality as well. I'd love to be able to use views_slideshows with node display instead of field, but the lack of a pager is a game stopper. I think what makes the most sense is to create a new pager for views that use "content" instead of "fields" which uses the node title by default. I started to try to get this to work, but I'm definitely stuck.

I've added a new widget to hook_views_slideshow_widget_pager_info(), added an entry to hook_theme with the same name, and began writing the preprocess code to add the titles. I thought I could get tricky and try to simply emulate exactly what $rendered_fields .= theme('views_slideshow_pager_field_field', array('view' => $vars['view'], 'field' => $field, 'count' => $count)); from _views_slideshow_preprocess_views_slideshow_pager_fields() does by hardcoding the divs. I ended up with something like this:

<?php
    $vars
['classes_array'][] = $vars['attributes']['class'];
   
$vars['widget_id'] = $vars['attributes']['id'];
   
$vars['classes_array'][] = 'views_slideshow_pager_fields';
   
$vars['rendered_field_items'] = '';
    foreach(
$vars['view']->result as $count => $node) {
     
$rendered_fields = '';
     
$node = node_load($node->nid);
     
$rendered_fields = '<div class="views-field-title"><div class="views-content-title">' . l($node->title, 'node/'.$node->nid) . '</div></div>';
     
$vars['rendered_field_items'] .= theme('views_slideshow_pager_field_item', array('vss_id' => $vars['vss_id'], 'item' => $rendered_fields, 'count' => $count, 'location' => $vars['location']));
    }
?>

This actually all appears to work, sort of - the titles get displayed as pager items, and all is well and good... but the JS doesnt fire. Clicking on the titles simply takes you to the node itself and doesnt advance the slideshow. I feel like I'm missing something pretty obvious here, but I cant seem to figure out what it is. Any chance you could give me a hint of how the JS functions and what might be stopping the above from functioning correctly?

Finally figured it out. The JS was getting hung up on if (Drupal.settings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) { because I wasnt including the activePauseOnHover setting in my preprocess...

<?php
 
// Build our javascript settings.
  
$js_vars = array(
    
'viewsSlideshowPagerFields' => array(
      
$vars['vss_id'] => array(
        
$vars['location'] => array(
          
'activatePauseOnHover' => $vars['settings']['views_slideshow_pager_fields_hover'],
         ),
       ),
     ),
   );
  
// Add the settings to the page.
  
drupal_add_js($js_vars, 'setting');
?>

If you like the general approach, I'll submit a patch.. it feels a tad hackish and I don't even want to think what happens if you try to build a slideshow out of non-node entities, I'd assume this approach would fail beyond belief.

I have problem with the slideshow module it doesn't appear on the block. All modules are already installed yet i cannot find the slideshow module. How does this module work ?

Jazclick, it's probably best for you to create a new issue with things like this instead of extending this one which is about a very specific feature request to the module.

Views slideshow, works, as the name would suggest, with the views module. It provides a display type to display the results of a view in a slideshow. I encourage you to watch some of the many screencasts out there on using views and/or specifically about views slideshows. Thanks!

I made a simple module that implements a numbered pager for node displays and uploaded it to a sandbox: http://drupal.org/sandbox/longwave/1340916

Title:Make views slideshow compatible with node displays.Make views slideshow pager compatible with node displays

Improving title.

longwave, your code doesn't work if the "hide if there is one slide" checkbox is checked.

That's why it's in a sandbox ;) It's only been briefly tested and works for my use case but probably not with many of the myriad of options that Views Slideshow offers.

You can post issues against the sandbox at http://drupal.org/project/issues/1340916

Following..

Thanks for this sandbox. I'm using it right now :)

Thanks for the sandbox, I'm using it (and it works). +1 for a patch to Views Slideshow core module!

+1 on the sandbox project being awesome.
+1 on #9 re: hiding if one slide is broken

To fix #9 just change the && to || in if (empty($vars['settings']['hide_on_single_slide']) && count($vars['view']->result) > 1) {

This is the same problem views_slideshow had recently and has recently been fixed.

I enabled the sandbox module, and can now enable the pager in the slideshow settings. However, the only option for "pager type" is "simple counter." So for my five slides, I can see the numbers 1-5, but I can't click on them to jump to that slide. What am I doing wrong?

So finally, I am on a project where I need a Views Slideshow. And I need a pager for display type "Content".

I installed the sandbox module from #7 and fixed the issue from #9 with comment #14.

Now, In encountered the same thing as gthing, it's nice to finally have a pager, but it's not clickable, thus it's not really useful yet. I was going through the module files of both Views Slideshow and Views Slideshow Simple Pager and finally came up with this one line solution (it's a long line, though):

Add the following at the end of the file views_slideshow_simple_pager.module right after the drupal_add_js(..) (line 44):

drupal_add_js('var uniquePagerID =
jQuery(".views-slideshow-pager-field-item").click(function() { var eID = jQuery(this).attr("id").replace("views_slideshow_pager_field_item_bottom_",""); var ssID = eID.substring(0,eID.lastIndex("_")); var sN = eID.substring(eID.lastIndex("_") + 1);
Drupal.viewsSlideshow.action({ "action": "goToSlide", "slideshowID": ssID, "slideNum": sN });  });', 'inline');

Note that this code is for a bottom pager, replace bottom with top if your pager is at top position.

The solution above did not work for me, but adding anchor tags to the fields output seemed to do the trick. Patch offered on the sandbox at http://drupal.org/node/1631782#comment-6111594

I did what @jenlampton did as well. The controls' markup can be overridden (see views_slideshow templates) and you can transform them in A tags which makes them clickable and focusable.

+1 for a patch (or submodule perhaps?) in the views_slideshow project. I'm using Views Slideshow Simple Pager sandbox too (+ the patch from #1631782: Allow pager to be clickable) for now ;)

Views Slideshow Simple Pager's code should be added into this module.

Any news about this ?

+1, I am very interested in this.

Thanks for the response!