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.
So this may not be perfect but i think its a good start to get the ball rolling.
here is the code : http://drupalbin.com/9359
This is my first time using nodequeue so i am having a hard time providing a proper integration with nodequeue and views etc etc.
Comment | File | Size | Author |
---|---|---|---|
#21 | nodequeue_pager.tar_.gz | 2.97 KB | Dentorat |
#19 | nodequeue_pager.tar_.gz | 2.79 KB | dsbrianwebster |
#11 | nodequeue_pager.zip | 3.71 KB | jerodfritz |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedThanks for taking the time to write this code!
There has been some discussion about the potential complications of such a feature at #378160: Pageing for long nodequeues which is worth reading. Please see the discussion there and feel free to jump in.
If this is not a duplicate, feel free to re-open this issue.
Thanks!
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedThis is not a dup. That issue talks about the admin view of a nodequeue.
This is a pager for an individual node, using next/prev to go through a nodequeue jumping from one node to the next. This is the kind of pager you would use on galleries, and it is one of the features that could make nodequeue an excellent tool for creating user gallery sets (think: flickr)
Though this use a paging object which is probably unnecessary...nodequeue's code isn't OO.
Comment #3
ezra-g CreditAttribution: ezra-g commentedThanks for the clarification. This would be an awesome addition, litwol! I agree with merlinofchaos that it would be more consistent with the rest of Nodequeue to have his feature not be OO. In any case, I hope to review soon.
Comment #4
litwol CreditAttribution: litwol commentedThere is no technical reasons behing me doing this in OO, i just wanted to scratch my own itch. I do not know nodequeue well enough to provide proper inegration, but with some guidelines and points from you i'm sure i could do it *the right way*.
Comment #5
ezra-g CreditAttribution: ezra-g commentedAny reason not to base this on http://drupal.org/project/custom_pagers ?
Comment #6
ezra-g CreditAttribution: ezra-g commentedMarked #459830: Previous/Next Navigation based on current node as a dupe of this.
Comment #7
gregglesNeeds more information for more than 5 weeks -> closed.
Comment #8
litwol CreditAttribution: litwol commentedIt doesn't need more information. It needs work to port OO code to drupal/nodequeue standard.
Comment #9
ezra-g CreditAttribution: ezra-g commentedCould you answer the question in #5?
Comment #10
litwol CreditAttribution: litwol commentedIt is different on a basis that it is more light weight, it is more an an API for developers than a self contained feature like custom_pagers. IMHO both are not mutually exclusive and have their own use cases. Best outcome would be to have both integrations. have to start somewhere right ?
Comment #11
jerodfritz CreditAttribution: jerodfritz commentedMy client wanted to be able to Next Previous between nodes based on their position in a nodequeue. I took some ideas from litwols class and made a module out of it. I have submitted it for review into contrib, but in the meantime feel free to use the attached.
Comment #12
sndev CreditAttribution: sndev commentedLOL! this is funny I have a patch already for the nodequeue_pager module. :) Something to deal with the nodequeue having a maximum of 5 nodes displayed in the pager functionality.
Comment #13
ezra-g CreditAttribution: ezra-g commentedMarked #737786: Create block(s) to allow Prev/Next navigation between nodes within a nodequeue while viewing the node itself as a dupe.
Comment #14
picardo CreditAttribution: picardo commentedCan anyone tell me if the patch has been added to the latest version of the module?
Comment #15
spazfoxPicardo: #11 is a separate module, not a patch. I downloaded and installed it and it works beautifully for me!
jerodfritz: any word on getting this approved for listing as a contrib module??
Comment #16
mokko CreditAttribution: mokko commentedjust for the record. I install and activate custom_pagers, associate some content types and the nodequeue-generated view and the pager appears on the page. Only "problem" is that it is not formatted nicely, so I have to work on css.
I would try the code from litwol and jerodfritz, but it seems that it is too much trouble installing from zip right this second. Therefore I am agnostic as to whether it merits to make a module out of that or not.
Comment #17
jjma CreditAttribution: jjma commentedI het the following error
This version is not compatible with Drupal 7.x and should be replaced.
Jon
Comment #18
amateescu CreditAttribution: amateescu commentedThe archive from #11 has a module that is only for Drupal 6, you need to port it to Drupal 7.
With that said, I'm going to close this issue because it's clearly possible to create this functionality in a separate contrib module.
Comment #19
dsbrianwebster CreditAttribution: dsbrianwebster commentedJust finished an initial port of this to D7 for a project I'm currently working on. I also addressed sndev's comment in #12.
Check it out. Maybe this should become an actual module?
I do wonder though at what point, rather at what length nodequeue, this pager becomes too strenuous on the DB.
Currently the module uses the nodequeue_load_nodes() function which builds the whole node object for each item in the queue. I think a custom db query retuning just the nids by their position would be leaner, no? Then perhaps we could set/get this result from the cache to avoid running this query on each node.
Thoughts?
Comment #20
Cellar Door CreditAttribution: Cellar Door commentedJust downloaded and used the D7 version - Works pretty good! Some undefined index issues to squelch but nothing large at all. Thanks for contributing this Delicious Simplicity!!
Comment #21
Dentorat CreditAttribution: Dentorat commentedI've added some options to the module from #19 as well as fixed a bug. The module now checks if the node is in the nodequeue so it doesn't come back with errors. I've also added the ability to customize the text of the previous and next buttons sitewide under the nodequeue pager settings, as well as added the options to each block of whether to show the title of the node being linked to as well as the ability to have the block show only previous, only next, or both links.
Comment #22
merlinofchaos CreditAttribution: merlinofchaos commentedIt seems like this should at least be a sandbox, not a tarball. Sandboxes can be promoted to true projects with ease, and anyone can make them.
Comment #23
autopoietic CreditAttribution: autopoietic commentedI have installed #21 and it seems to be working fine. Thanks litwol, jerodfritz, DS and penthehuman!
I agree with merlin that this should probably go into a sandbox, happy to put it there, but don't want to imply ownership. @litwol?
Comment #24
litwol CreditAttribution: litwol commentedThrow credits somewhere in the module and it's all fine. More importantly making it into a separate project may increase ease of adaptation and help users so go ahead with it.
Cheers.
Comment #25
autopoietic CreditAttribution: autopoietic commentedI have create a sandbox project to hold this module. I have only added the D7 version for now.
I moved theming to theme function to allow overrides and refactored slightly to remove the paging object as suggested by @merlinofchaos in #2.
https://drupal.org/sandbox/autopoietic/2285747
Comment #26
jenlamptonSince this there are no patches provided, but several other contrib solutions for this problem, I'm going to mark this issue as closed / outdated. If anyone is interested in providing a patch to integrate one of those solutions into nodequeue directly, please reopen this issue with said patch attached.