On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • seems, you have furls off
    try to change this part of the snippet to:

    $url=$modx->makeUrl($ajaxpage);
    $furls = $modx->getOption('friendly_urls');
    $qstring = !empty($furls) ? '?page=' : '&page=';
    $js="
    <script>
    $(document).ready(function() {
    new Paginator('{$url}',{qString : '{$qstring}'});
    }); 
    </script>
    ";
    $modx->regClientStartupHTMLBlock($js);
    
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
    • I did this simply with only jQuery by adding the following to the ajax page with getList on it:
      	$("ul.pagination a").click(function(event) {
      	  event.preventDefault();
      	  var clicked = $(this).attr("href");
      	  $.get( clicked, function( data ) {
      	    $( "#container" ).html(data);
      	  });
      	});
      
      • This is a rather old topic, but you never know if somebody needs it, so here's my contribution:

        I don't use getPage for pagination, I use getResources with a limit of 0 in combination with the plugin MixItUp. Also with this combination some powerful filtering and sorting is possible.

        Remark: MixItUp is not free for commercial use.
        • pdoPage has built-in ajax pagination - https://youtu.be/pVVol-gCiv4?t=2m