I think, it should look like that:
<?php
$contratto = $modx->getOption('contratto', $_REQUEST, '');
$mentratura = $modx->getOption('mentratura', $_REQUEST, '');
$wheres = array();
if (!empty($contratto)) {
$wheres[] = array('contratto' => $contratto);
}
if (!empty($mentratura)) {
$wheres[] = array('mentratura:>=' => $mentratura);
}
$config['where'] = $modx->toJson($wheres);
the default getdatas - class does use its own pagination
https://github.com/Bruno17/bloX/blob/master/core/components/blox/projects/blox/modTable/table/includes/getdatas.class.php
you just need to set a limit and have the [[+pagination]] - placeholder in you outer - tpl like here:
https://github.com/Bruno17/bloX/blob/master/core/components/blox/projects/blox/modTable/div/templates/bloxouterTpl.html
but you can allways create your own custom getdatas-class to make it compatible with getpage, if you don't like the internal pagination
There isn't any solution ?
sure, there is a solution.
you would need a custom getdatas.class.php
where you put the needed query-string into the original_query_string - property
https://github.com/Bruno17/bloX/blob/master/core/components/blox/projects/blox/modTable/div/includes/getdatas.class.php#L49
$p = new Pagination(array(
'per_page' => $this->bloxconfig['limit'],
'num_links' => $this->bloxconfig['numLinks'],
'cur_page' => $this->bloxconfig['page'],
'total_rows' => $numRows,
'page_query_string' => $this->bloxconfig['pageVarKey'],
'use_page_numbers' => true,
'original_query_string' => $yourOriginalQueryStringGoesHere
));
Do not hack the original getdatas.class, but create a new one under /projects/custom/yourtask/includes/