A
A
Andrew2016-07-15 17:03:19
MODX
Andrew, 2016-07-15 17:03:19

Why is pdoPage not displaying results?

I need to filter the results and I send an ajax request and call the snippet there.

$page = isset($_REQUEST['page']) ? $_REQUEST['page'] : '1';

$results = $modx->runSnippet('pdoPage', array(
  'parents' => $category[0],
  'resources' => $resources,
  'element' => 'msProducts',
  'totalVar' => 'products.total',
  //'ajaxMode' => 'button',
  'ajaxTplMore' => 'more-button',
  'tpl' => 'good-row',
  'depth' => '1',
  'limit' => 0,
  'showHidden' => '0',
  'includeThumbs' => '320x415',
  'sortby' => 'createdon',
  'sortdir' => 'DESC',
  'includeTVs' => 'filter-age, filter-sex',
  'page' => $page
));


The problem is that if the 'ajaxMode' => 'button' parameter is set, then nothing is displayed. Everything works great without it.

Maybe some other parameters need to be passed, or something to call after ajax?

Tell me, in which direction to dig at least?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-07-18
@P1RATE

I wrote my solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question