Closed (fixed)
Project:
Views cycle
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2009 at 23:59 UTC
Updated:
28 Jun 2010 at 15:00 UTC
Jump to comment: Most recent file
I have created a patch that allows the user to specify whether to add previous and next buttons above or below the cycle, and then allows the user to specify the labels for each of the buttons.
Please review and see if this might be worth integrating into the core module.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views_cycle-prevnext-v2.patch | 4.79 KB | chayner |
| views_cycle-prevnext.patch | 4.75 KB | chayner |
Comments
Comment #1
chayner commentedComment #2
chayner commentedComment #3
JayKayAu commentedThank you so much for this!
Comment #4
JayKayAu commentedHi chayner,
Again, thanks for putting this together. I noticed that when the prev/next buttons are added, they're in a ul tag that doesn't have any id or class attributes, which makes Theming a bit of a problem. However, they can be easily added by modifying lines 107 and 109 of this patch.
I'm a total noob with Drupal and patches (this was the first patch I've ever applied), and I haven't the feintest idea how to re-roll anything. So my apologies for not being much of a help.. I'll learn to do this soon (I promise!).
Comment #5
chayner commentedJayKayAu --
I've added these changes to the most recent patch. Now, the previous/next ul has an ID (as you requested), and the pager has ID's on each of the li's as well.
Let me know if you have any questions!
Comment #6
dddave commentedComment #7
jdwfly commentedThis patch applied clean for me and worked too. I second this much needed feature for this module.
Comment #8
Mac Clemmens commentedApplied the patch - works great!
Comment #9
finex commentedThe patch can be adapted to the -dev version. The patches about the two .inc files are ok, the changes to the .js file needs a small change. The correct patch for the views_cycle.js file is:
It looks that the makeAnchors() function doesn't need to be modified in -dev anymore.
Comment #10
Crell commentedThe patch in #5 didn't apply properly. I also think that, like the pager, the next/prev links positioning belongs as a skin property.
I've committed a modified approach that allows skins to specify whether or not they offer next/prev links. The text of the next/prev links is also themeable, so themes can tweak the HTML if desired.
Thanks all!
Comment #12
jaxxed commentedexcuse my ignorance, I'm new to this very handy module.
Is there anyway to make the includion of the next/prev more template based, so that I can adapt the layout of the elements to create more dynamic pagers. The prev/next div and buttons are the only elements that are not handled in the template, and are not overridable in custom themes. At first I thought that this was a limit that came from the jquery.cycle project, but the html elements are hardcoded into the drupal module js file.
The benefits would be nice and it would really conform to drupal standards better (no magically appearing layout elements.) I understand that the approach taken follows in line with some other code in the module, and that my idea essentially split up some functional logic, and then magically hopes that the two parts coincide, but I still find it interesting.
I'd be willing to do it myself but I'd appreciate your advice in potential pitfalls and practical approaches.
I''m playing with it by modifying the views_cycle.js prev/next code to:
(removing the Drupal.theme call as well of course)
and then modifying the template as follows:
Please advise or comment