Download & Extend

The number of "pager fields" is not equal to the number of slides when "Items per slide>1"

Project:Views Slideshow
Version:7.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Hello!
Thank you for wonderful and continuously growing module !
I am trying to show 7 nodes using VSS. I set to show 5 items per slide.
So, i have 2 slides and 7 items(nodes) totaly.
When i enable the pager, i see that the number of "pager fields" is equal to the number of items (7). Instead, i expect that the number of "pager fields" has to be equal to the number of slides (2).
I've attached a drawing which can explain better my thoughts.

Is this a bug?
Once again thank you for great module!

AttachmentSize
items per slide and pagers.pdf181.78 KB

Comments

#1

I remember that this function had been almost implemented in the ThumbnailHover.
Unfortunatly, i voted against this function here
I regret now because i see that it can be useful. The example of usage is shown in the header of this issue (pdf file).

I tried to play with the code of "views_slideshow.theme.inc".
Here is the patch against latest dev (28Feb).
I tested it.
It works both for:
a) Items_per_slide = 1 (all pager fields are displayed)
b) and for Items_per_slide>1 (the number of "pager fields" is equal to the number of slides)

AttachmentSize
1075844-intyms-01.patch 2.45 KB

#2

Title:The number of "pager fields" is equal to the no. of items when we use "Item per Slide" settings» The number of "pager fields" is not equal to the number of slides when "Items per slide>1"
Status:active» needs review

changing title + status

#3

Status:needs review» needs work

I think, it makes more sense, if the "pager field" will reflect the first item of every slide.
Thus the navigation will be more logical.

AttachmentSize
items per slide and pagers2.pdf 96.16 KB

#4

Status:needs work» needs review

here's the patch.
I forgot to mention that:
It works both for:
a) Items_per_slide = 1 (all pager fields are displayed)
b) and for Items_per_slide>1 (the number of "pager fields" is equal to the number of slides).

AttachmentSize
1075844-intyms-02.patch 2.39 KB

#5

Some users may consider usefull the grouping of pager fields. Here is the patch for this.
The patch needs work. The active class doesn't assign to the pressed pager field. I don't know how to fix it.

A comparison of all 3 pathes is showing in the attached pdf.

I think both patches 2 and 3 are useful. It will be great if the user can choose which pager behavior to use.
So, it will be wonderful to have a dropdown box on the slideshow configuration page.
Redndahead, what do you think about this?

I don't have any experience on views customization, so it will take a long time to implement such feature by myself.

AttachmentSize
1075844-intyms-03.patch 2.22 KB
items per slide and pagers3.pdf 196.69 KB

#6

The patch seems to work on 7.x version, but active/odd/even styles doesn't work anymore. Maybe conflict with function template_preprocess_views_slideshow_pager_field_item()

#7

If you use the patch "1075844-intyms-01.patch" then the styles are working fine.
Instead, the patches "...-02" and "...-03" break the styles.

Regarding "-02 patch". Attached is a new one. Apply it to latest dev from 28Feb. It fixes the active class problem.

AttachmentSize
1075844-intyms-02-styles fix - dev28Feb.patch 2.54 KB

#8

here is a new "...-03" patch (grouping of pagers). It seems to fix the style problem.

AttachmentSize
1075844-intyms-03-styles fix - dev28Feb.patch 2.29 KB

#9

At this step we have 4 possible pager behaviors.
First behavior is provided by the current dev.
Other 3 behaviors are provided by the patches 01, 02 and 03.
I don't know which behaviour can satisfy the majority of users.
Also, maybe the "views slideshow" maintainers have other preferences regarding pagers.
I suggest to identify which variant (behaviour) is better.
Also, my coding style is bad because i am not a programer. Maybe somebody, more proffesional coder, can help to create patches.

#10

dupplicate post

#11

The attached pdf contains more information regarding pager behaviours mentioned above.
Let's discuss which one is better.

AttachmentSize
pager behaviours.pdf 193.32 KB

#12

Version:6.x-3.x-dev» 7.x-3.x-dev

moving to 7 so I can find it easier

#13

Ok I've been looking at this and I would really, really like to implement this somehow. The one problem I have is it requires me to special case views_slideshow_cycle for the pager. I'm thinking the best thing to do is create another pager type that does the special casing.

What do you think?

#14

Yes, i think, to create another pager type is good.
In this case, other modules will have a possibility to use it too. Am i right?

#15

Well other modules that utilize the grouping feature we offer in views slideshow cycle. Because really the code will have to check for that feature and then work accordingly.

#16

Category:bug report» feature request
Status:needs review» needs work

bumping to needs work and to feature request. If someone wants to create a patch that adds a new pager type to views slideshow cycle that supports grouping that would be great.

#17

I came up with the following patch based on the work in #8. It handles the active class correctly for me. Note that I am using 6.x

AttachmentSize
views_slideshow.theme_.inc_.patch 2.12 KB

#18

I would prefer that this is handled in views slideshow cycle instead of views slideshow

#19

Subscribing, this is exactly what I need.

I want to display 4 content nodes at a time, but for the views slideshow to transition along with the pager for views. Currently, it's only working when I set at least 8 on views items pager, but if there's more than 8, the views slideshow doesn't go to the rest of the items like how the views pager does it. Please how to fix this bug?

#20

I was having issues with the pager using Items per slide > 1 as well (7.x). I disabled the pager, added the json2 library and used that to set the pager selector and I added the slider html element to the view footer I added to the footer. This works for number based paging so I thought I'd share.

#21

hi Lee20,

can you show us what you did? a screenshot would be great!

thanks

#22

@duckx - I have since had to switch to the jcarousel plugin for other reasons so I can't grab a screenshot. But to better describe what I did.. After adding the json2 library you have more options where you can manually set options for the cycle plugin.

I used that ability to set the "pager" option: eg.
{pager: '#my-pager-id'}

From there, I added the element for the pager in the views' footer. Eg:
<div id="my-pager-id"></div>

#23

confirmed working.. thanks! .. basically what you need to do is create an empty div container with an ID. then in the slideshow advanced settings area you designate which container to populate the pager in.