Anyone have luck in getting the Stash-style of pagination to work with Infinite Scroll? Is it possible?
1 Answer
UPDATE:
Got it working. This is what I have for those following:
set_list template:
{stash:embed:layouts:homepage}
{exp:stash:context name="100_list"}
{exp:stash:set_list
name="movie_list"
context="@"
parse_tags="yes"
save="yes"
scope="site"
refresh="1440"
replace="no"
}
{exp:channel:entries
channel="films"
category="1"
disable="category_fields|member_data"
}
{stash:movie_name}{title}{/stash:movie_name}
{stash:movie_url}{url_title_path='movie'}{/stash:movie_url}
{stash:movie_poster}{exp:channel_images:images entry_id="{entry_id}" limit="1"}{image:url:grid}{/exp:channel_images:images}{/stash:movie_poster}
{/exp:channel:entries}
{/exp:stash:set_list}
homepage embed with get_list:
<ul class="large-block-grid-5 grid-infinite">
{exp:stash:get_list
name="movie_list"
context="@"
parse_tags="yes"
parse_conditionals="yes"
limit="20"
orderby="movie_name"
sort="asc"
paginate="bottom"
}
<li class="grid-item-block">
<a href="{movie_url}" title="{movie_name}">
<div class="grid-item-info">
<div class="grid-item-title">
<h1 class="title-cap">{movie_name}</h1>
</div>
</div>
<img src="{movie_poster}" alt="{movie_name}">
</a>
</li>
{paginate}
<div class="navigation">
{if next_page}<a class="next js_hide_next" href="{auto_path}">Next Page</a>{/if}
</div>
{/paginate}
{/exp:stash:get_list}
</ul>
javascript settings:
<script type="text/javascript">
$(document).ready(function(){
$('.grid-infinite').infinitescroll({
navSelector : ".navigation",
nextSelector : "a.next",
itemSelector : ".grid-item-block",
contentSelector: ".grid-infinite",
extractLink: true,
})
});
</script>