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

$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, nothing is output. Without it, everything works fine.

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

Tell me which way to dig at least?

    1 answer 1

    https://docs.modx.pro/components/pdotools/snippets/pdopage#Download-button - if you read the instructions, it says that При нажатии на кнопку загружаются &limit элементов и добавляются в конец блока результатов - and you & limit = 0 . This is most likely an error.