[development] how to display an extremely large document

Earnie Boyd earnie at users.sourceforge.net
Mon Jan 26 20:35:16 UTC 2009

Quoting Jamie Holly <hovercrafter at earthlink.net>:

> I haven't seen anything done like this in Drupal (not saying 
> something doesn't exist that I just missed), but a good example would 
> actually be Google Reader. It loads content as you scroll the window 
> down through AJAX. I have actually thought about using this on sites 
> that get a bunch of comments. Load say 50 at a time, then have the 
> next 50 auto-load as the user gets closer to the bottom of the page.

Jamie, you probably want panels and views.

> Jamie Holly
> David Cohen wrote:
>> I'm building a site to support a very large outline of legal cases. 
>> There are thousands of nodes in the outline, each with a very small
>> amount of text.  The outline is about 5 or 6 levels deep.  I've written
>> some code to import the outline into the book module.  So the book
>> hierarchy reflects the outline and the node bodies contain these small
>> chunks of text.

I've used http://drupal.org/project/relativity to create outlines.  It 
allows you to associate existing nodes to the relative mapping or 
create new children.

>> I'd like to display the entire outline in a single page.  This is not
>> practical because of the overall size.  Still I'd like the user to feel
>> as if they are scrolling through the entire thing, not visiting
>> thousands of different pages.

It doesn't display on a single page but you can create a menu of items 
and the page presents child and parent links.

>> My idea is to use AJAX to accomplish this.  Imagine how google maps
>> works (start somewhere but scroll to anywhere, use ajax to refresh the
>> view after the scroll).  I'd like the same thing for arbitrary HTML.  In
>> other words the browser starts with mostly placeholder divs and a small
>> amount of content.  As the user scrolls around, the placeholders get
>> replaced with real content.  And the real content which scrolls out of
>> view gets cleaned up so the browser does not run out of memory.

I haven't attempted using AJAX.  It may be possible to create a view 
from the relative mapping table and show the outline in a panel.

>> Has anyone encountered such a thing?  Or would be interested in
>> collaborating on it?  Any reason why it would not work?

I don't no of any reason why it shouldn't work.

Earnie  http://r-feed.com
  Make a Drupal difference and review core patches.

-- http://for-my-kids.com/  -- http://give-me-an-offer.com/

More information about the development mailing list