By default this gives me a vertical infinite scroll. Is there an easy way to change this to horizontal infinite scrolling?

Comments

Remon’s picture

Could you please give an example of where this could be helpful?

sol roth’s picture

No problem, Check out:

http://www.planetillogica.com/ronenglish

This is the old site, we're redesigning and buildling it in Drupal 7, but this is a perfect example of where a horizontal infinite scroll would be awesome. Some artists will feature a large amount of portfolio items, say 200 or more, especially with the new media module's easy uploading of multiple images / videos with flickr/youtube integration. Pre-loading 100 images would be horrible for performance, but making a user click 10 times to go through each person's gallery would be even less than ideal. With a wall of artwork, a horizontal scroll makes a lot more sense and looks better for this particular use (wouldn't you agree)?

Horizontal scrolling is used a lot on artist and photography portfolio sites so you can see two images side by side instead of on top of each other. We also have other views where you see large works of art next to each other and would like to use horizontal scrolling, so same thing but with larger images. (This isn't in drupal, but it's another fantastic example of effective horizontal scrolling through large amounts of images. - http://www.eoloperfido.com/portfolio.htm) The designer wanted to show a wall of portfolio images, in the re-designed version the user info is also on the left hand side so you can see the artist while you're checking out there work.

sol roth’s picture

Also while we're on the subject, it would be great to enable the user to use there arrow keys to scroll left and right.

honza pobořil’s picture

This module loads content under old content in code. Is i possible to render content inline by CSS?

fallenturtle’s picture

I'm trying to do something similar. This is the code I'm using based on the unformatted Views template that I've overridden:

<?php if (!empty($title)): ?>
  <h3><?php print $title; ?></h3>
<?php endif; ?><table><tr>
<?php foreach ($rows as $id => $row): ?><td class="postcell"><div><img src="<?php print $directory; ?>/images/spacer.gif" width="500" height="1"></div>
  <div class="<?php print $classes_array[$id]; ?>">
    <?php print $row; ?>
  </div></td>
<?php endforeach; ?></tr></table>

But the autopager is just adding new div's below the table instead of adding more columns to the table.

vimalramaka’s picture

subscribe

murz’s picture

subscribe

murz’s picture

I have found sandbox module that can help you do the horisontal scroll via "Load more" link: http://drupal.org/sandbox/ericduran/1184978

fallenturtle’s picture

murz’s picture

He renamed it, correct url is http://drupal.org/project/views_load_more

fallenturtle’s picture

Thanks... I tried it but couldn't make heads or tails on how to use it. Just seemed to give me a link to view another page instead of inline loading them.

murz’s picture

fallenturtle, i think that it is not easy to detect when you scroll page in horizontal mode, so I don't know how to solve it without "Load more" link.

h4rrydog’s picture

I kind of got it to work (the loading more upon reaching the waypoint part) by also installing the Waypoints module alongside Views Load More module and turning on AJAX in the View.

It clearly is loading the additional "pages" of content after the original page, although it doesn't seem to wait for the "pager" item to become exposed. I suspect it has to do with how jQuery is detecting whether the content is exposed - perhaps by the vertical position and not horizontal?

Did you get any further with your project? Let me know if you got it to work and how you did it. :)

Remon’s picture

Status: Active » Postponed
davery’s picture

This works. Get jcarousel, set up your view with jcarousel set to have as many items visible as you want columns visible.

Copy jcarousel-view.tpl.php to your theme's template dir, picking one of the names views gives you to override the default.

Edit it to look something like this: (here, 4 items/column. generalized would be $i % $n == 0, $i % $n == ($n-1) in the two if statements)

<ul class="<?php print $jcarousel_classes; ?>">
  <?php
        $i = 0;
        foreach ($rows as $id => $row):
                if($i % 4 == 0): ?>
                        <li class="carousel_column_container" style="height: 500px;"><ul class="carousel_column" style="height:500px;">
                <?php endif; ?>
                <li style="height: 125px; display: block;" class="<?php print $row_classes[$id]; ?>"><?php print $row; ?></li>
                <?php
                if($i % 4 == 3): ?>
                        </ul></li>
                <?php endif;
                $i++; ?>
  <?php endforeach; ?>
</ul>

The style attributes are there to show proof of concept, and it looks rough. It would take more styling to make it look good.

Cheers.

thijsvdv’s picture

I wrote a little blogpost on how I got horizontal infinite scrolling working:

http://drupal.the-aim.be/horizontal-infinite-scrolling

Hopefully, it will be helpful to someone.

honza pobořil’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)