Skip to content

Instantly share code, notes, and snippets.

@vgrish
Created September 5, 2013 08:08
Show Gist options
  • Save vgrish/6447305 to your computer and use it in GitHub Desktop.
Save vgrish/6447305 to your computer and use it in GitHub Desktop.
<div class="gallery" id="listsite">
[[!getPageExt@my?
&toPlaceholder=`resList`
&element=`msProducts`
&parents=`3`
&depth=`0`
&includeContent=`1`
&showHidden=`1`
&tpl=`tpl.msProducts.row22`
&limit=`5`
]]
[[[[!+page:gt=`[[+pageCount]]`:then=`sendError404.1`:else=`+resList`]]]]
<!--<div class="pagination">-->
<ul>
[[!+page.nav]]
</ul>
<!--</div>-->
</div>
<script type="text/javascript" src="assets/temp/jquery.infinitescroll.js"></script>
<script type="text/javascript">
$().ready(function()
{ $('#listsite').infinitescroll({
navSelector : "a.pagin",
nextSelector : "a.pagin",
itemSelector : "div.gallery",
debug: true, loadingText:'Пожалуйста подождите. Идет загрузка данных',
donetext:'Достигнут конец списка',
loadingImg : "assets/temp/ajax-loader.gif"
});
});
</script>
__________________________senderror___________________
<?php
$_GET['page'] = 1;
$modx->sendForward($modx->resource->id, 'HTTP/1.1 404 Not Found');
______________________________________________________
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment