[drupal-devel] [feature] Paging support for long page nodes

scutari drupal-devel at drupal.org
Wed Aug 31 15:23:27 UTC 2005


Issue status update for 
http://drupal.org/node/30089
Post a follow up: 
http://drupal.org/project/comments/add/30089

 Project:      Drupal
 Version:      4.6.3
 Component:    page.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  scutari
 Updated by:   scutari
 Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/paging.module (1.99 KB)

Ok, that's a paging module based on my first patch (it does not fix the
preview bug).
I think I'll be able to include my preview fixes (those in the second
patch I sent) before this weekend.


I reverted the first patch on my drupal site, and used the paging
module instead with good results.


Regards
   Marco




scutari



Previous comments:
------------------------------------------------------------------------

Wed, 31 Aug 2005 10:36:10 +0000 : scutari

Attachment: http://drupal.org/files/issues/submitted_page_0.patch (1.84 KB)

This is a *beta* support for paging (splitting long page nodes into
smaller chunks) using a  <!-- page --> tag.


Even in this beta stage it works flawlessly in my drupal 4.6.3.


Preview of splitted nodes is broken without some other hacks; I'll
provide them as patches if this feature request is deemed interesting.




------------------------------------------------------------------------

Wed, 31 Aug 2005 11:08:21 +0000 : lennart

I find this to be an important and interesting feature!


Best wishes,
Lennart




------------------------------------------------------------------------

Wed, 31 Aug 2005 11:26:03 +0000 : scutari

Attachment: http://drupal.org/files/issues/submitted_node_0.patch (692 bytes)

I'm very happy it's useful!


With this additional patch (it's against node.module) the <!-- page -->
tag is changed to <!-- pg --> in node_preview so that paging is not
triggered. The whole page in displayed instead.


Yes, it's a dirty hack, and comments are welcome if anybody knows how
to do it in a clean way.


Regards
   Marco




------------------------------------------------------------------------

Wed, 31 Aug 2005 12:24:47 +0000 : sgwealti

The onion website just switched to drupal and they seem to have a pretty
good pager for their nodes.  I wonder how they did it.




------------------------------------------------------------------------

Wed, 31 Aug 2005 12:32:23 +0000 : Bèr Kessels

IMO this really needs to live in a module.




------------------------------------------------------------------------

Wed, 31 Aug 2005 12:54:49 +0000 : scutari

It can be done in a module using a couple of hooks, but in my opinion
it's overkill for such a small change. I think the proper place for
such a feature is core.


A new core module may be fine, too, but I would like to hear some other
comments before I
make up my mind.




------------------------------------------------------------------------

Wed, 31 Aug 2005 14:30:16 +0000 : robertDouglass

It would need a menu item to intercept the node/nid/pagenumber param,
and a filter to split the pages at a configured length. Ber is right
that this should start out as a module, and then when it has proven
itself, get integrated into core. I definitely want to see it happen
but won't get around to programming it myself anytime soon.




------------------------------------------------------------------------

Wed, 31 Aug 2005 14:31:20 +0000 : robertDouglass

Has anyone considered asking The Onion if they would be able to share
the code that does that? It might be that they wrote custom Drupal code
just for the purpose. Seeing as they are using Drupal to make one of the
best looking news sites on the web, they might be receptive to giving
back to the community.




------------------------------------------------------------------------

Wed, 31 Aug 2005 14:41:42 +0000 : tostinni

"Has anyone considered asking The Onion if they would be able to share
the code that does that? It might be that they wrote custom Drupal code
just for the purpose. Seeing as they are using Drupal to make one of the
best looking news sites on the web, they might be receptive to giving
back to the community.

"
I wrote them yesterday and I hope they would give us some feedback.
Their site is looking very good and  integrate very well some
contributed and custom module.


Regarding pagination, I foud this link a while ago, I don't know if it
works, but might worth the glimpse :
http://drupal.org/node/23362#comment-43694




------------------------------------------------------------------------

Wed, 31 Aug 2005 15:21:49 +0000 : Prometheus6

"Regarding pagination, I foud this link a while ago, I don't know if it
works, but might worth the glimpse :
http://drupal.org/node/23362#comment-43694

"
It works...I'm the guy that told him how to do it.
http://drupal.org/node/23362#comment-40754


It's so easy I honestly thought it was left out on purpose.







More information about the drupal-devel mailing list