Closed (fixed)
Project:
Views Slideshow
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
1 Oct 2009 at 23:16 UTC
Updated:
25 Mar 2017 at 20:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
redndahead commentedI like it. Didn't know that we could do this. Can you write a quick example on how you would theme this? Just so if someone runs into the issue they would be able to see and I might be able to document later.
Comment #2
Anonymous (not verified) commentedThe whole method I used was bunk, but it worked because it fell back to the default views slideshow pager. It was returning actual HTML output to the settings used to instantiate the slideshow, but the slideshow options want a function.
This patch works better, but I'm beginning to NOT like it because a theme function should be returning HTML and here the theme function returns a function.
nonetheless, here's a patch. It works. I can override my pager links now.
Comment #3
redndahead commentedAny chances of throwing this bit outside the if (pager_type == 1) so we don't have to duplicate it? Possible problems?
This review is powered by Dreditor.
Comment #4
Anonymous (not verified) commentedI think I figured out how to make this more sensible.
Check it out.
Something about the 'pager type' bothers me... it would be ideal if we could expose a list of theme functions that return pager links to the UI.
But this works for me for now.
Comment #5
redndahead commentedI think it's almost there. This one uses named indexes instead of 0, 1. It then cleans up a number of areas.
What do you think?
Comment #6
Anonymous (not verified) commentedThe only thing I don't understand is why the pager type is added to the class attribute. Views_slideshow is already doing a lot of "thick" HTML, but I know this is what Views does by default and some of it is what jquery cycle requires... Do you really need to add the pager type to the class?
Also this line contains a bug. It will cause this to be output:
I'm on crack. Are you, too?
Comment #7
redndahead commentedI add the pager type so that we can style certain pager types differently than others in css. I may have numbers in some place, but images in another I need a way to differentiate between the two. Or eventually I may have jcarousel in one place and images in another so I need to know when I have what.
Nice catch with the quote. Adjusted patch attached
Comment #8
Anonymous (not verified) commentedI think the goals of this feature request have been met. Thanks!
A sturdier long-term solution will be on my mind... The two pager types are basically theme variants already, and providing the numbered and thumbnail options in the UI means the code is a little less elegant. My pager type uses square bullets for the anchors. Adding a new pager type means patching the display plugin or choosing a pager type's theme function to override. However, I don't think Drupal.theme() could do a good job with it either, because it's very rudimentary. Hmm... think think think.
Comment #9
redndahead commentedThanks a bunch bangpound. This has been committed.
Comment #11
endiku commentedShould the Drupal.theme.prototype.viewsSlideshowPagerNumbered in the views_slideshow.js
patch return a span instead of a div? I'm having a stacking behavior since I don't see any float setting for those js created divs.
Otherwise fantastic work. I struggled for hours with the page theming until I came across this patch.
Comment #12
redndahead commentedCan you explain more why it should return a span instead of a div?
Comment #13
redndahead commentedMarking as fixed. Feel free to reopen if you still have the same issue.