Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#33 | 1075844-items_per_slide.patch | 3.4 KB | jnettik |
#29 | pager-items_1075844.patch | 7.06 KB | jnettik |
#28 | views_slideshow-1075844-28.patch | 9.96 KB | georgemastro |
#26 | views_slideshow-1075844-26.patch | 2.98 KB | JonMcL |
#17 | views_slideshow.theme_.inc_.patch | 2.12 KB | kgthompson |
Comments
Comment #1
intyms CreditAttribution: intyms commentedI 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)
Comment #2
intyms CreditAttribution: intyms commentedchanging title + status
Comment #3
intyms CreditAttribution: intyms commentedI think, it makes more sense, if the "pager field" will reflect the first item of every slide.
Thus the navigation will be more logical.
Comment #4
intyms CreditAttribution: intyms commentedhere'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).
Comment #5
intyms CreditAttribution: intyms commentedSome 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.
Comment #6
camdarley CreditAttribution: camdarley commentedThe 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()
Comment #7
intyms CreditAttribution: intyms commentedIf 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.
Comment #8
intyms CreditAttribution: intyms commentedhere is a new "...-03" patch (grouping of pagers). It seems to fix the style problem.
Comment #9
intyms CreditAttribution: intyms commentedAt 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.
Comment #10
intyms CreditAttribution: intyms commenteddupplicate post
Comment #11
intyms CreditAttribution: intyms commentedThe attached pdf contains more information regarding pager behaviours mentioned above.
Let's discuss which one is better.
Comment #12
redndahead CreditAttribution: redndahead commentedmoving to 7 so I can find it easier
Comment #13
redndahead CreditAttribution: redndahead commentedOk 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?
Comment #14
intyms CreditAttribution: intyms commentedYes, 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?
Comment #15
redndahead CreditAttribution: redndahead commentedWell 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.
Comment #16
redndahead CreditAttribution: redndahead commentedbumping 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.
Comment #17
kgthompson CreditAttribution: kgthompson commentedI 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
Comment #18
redndahead CreditAttribution: redndahead commentedI would prefer that this is handled in views slideshow cycle instead of views slideshow
Comment #19
goldlilys CreditAttribution: goldlilys commentedSubscribing, 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?
Comment #20
lee20 CreditAttribution: lee20 commentedI 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.
Comment #21
patoshi CreditAttribution: patoshi commentedhi Lee20,
can you show us what you did? a screenshot would be great!
thanks
Comment #22
lee20 CreditAttribution: lee20 commented@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>
Comment #23
patoshi CreditAttribution: patoshi commentedconfirmed 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.
Comment #24
NIKS_Artreaktor CreditAttribution: NIKS_Artreaktor commentedHello everyone.
#22
Posted by lee20 - didnt understood how it work. Please explain more detailed if you can.
I solved this problem!
in post #17 Posted by PadreHomer - there was a patch file, but for D6
I changed it a little and it already works for D7
I used 7.x-3.x-dev 2012-Apr-25
File views_slideshow.theme.inc
From line 232-285
Comment #25
Ace Cooper CreditAttribution: Ace Cooper commentedThe idea behind Patch #3 is the way to go for a numbered pager.
Thanks a lot, NIKS_Artreaktor, I added your code from #24 and the pager with multiple items per slide works like a charm.
I didn't select any fields for the pager, just added some CSS for the empty pager markup to show up - http://i.imgur.com/9MBYh.jpg
Required CSS (not final, just to make pager visible in Chrome):
Comment #26
JonMcL CreditAttribution: JonMcL commentedCode from #24 worked out great for me (field pager, with no fields).
I rolled NIKS_Artreaktor's code as a patch. I'm not necessarily skilled in the ways of making patch, so please let me know if this needs fixes.
Comment #27
jnettikI tested out the code in #24 and it worked for me as well. Thank you.
Comment #28
georgemastro CreditAttribution: georgemastro commented#26 didn't work for me so I made a new one.
Comment #29
jnettikSo after using the code in #24 for a bit I did run across a couple issues. The pager number was correct but if you added a page counter the number was off. Also, if you used the options "Hide pager if there is only one slide" and "Hide controls if there is only one slide", it breaks as it's still counting based off of the number of rows and not slides.
I attached a patch based off the code in #24 that addresses all these issues for me.
Comment #30
jnettikComment #31
patty.fresonke CreditAttribution: patty.fresonke commentedUsed the patch in #29 and it worked like a charm! Thanks!EDIT:
Just noticed that my 'active' pager isn't working properly...
Slider page 1 the proper pager is highlighted
Slider page 2 nothing is highlighted
EDIT: (again)
So something must be missing between #24 and #29 because using #24 the pager works properly
Comment #32
jnettikLooking more into this, the Items per Slide setting comes from views_slideshow_cycle and not the main views slideshow module. I think the theme overrides for that setting need to be accounted for in that module anyway.
Comment #33
jnettikOk so attached is an updated patch that changes the slide counter's total from being count($rows) to $slide_count, which is created in _views_slideshow_preprocess_views_slideshow_slide_counter. This lets views_slideshow_cycle change how that is calculated if the slideshow type is views_slideshow_cycle.
I'm also preprocessing the pager so that it stops rendering items after it hits the number of slides there is.
Comment #34
estoyausenteThis last patch run perfectly. ¡Thanks! ;-)
Comment #35
jnettikMarking this as RTBC. Hopefully we can get this committed.
Comment #36
BrendanP CreditAttribution: BrendanP commented#33 working for me. Thanks for the patch.
Comment #37
dankh CreditAttribution: dankh commentedPatch #33 worked for me too, thank you ! This is a very important feature, please consider commit so we can follow at least the dev version.
Comment #38
flocondetoilepatch #33 works fine. Not committed yet ?
thanks
Comment #39
xiukun.zhou CreditAttribution: xiukun.zhou commentedCommit: 9e2df93