Maybe something like this (untested) snippet:
create a new snippet with the code below (named whatever you like, for this example it's named "DittoDetails").
replace your existing ditto snippet call with the new snippet.
[[DittoDetails]] or [!DittoDetails!]
modify your detail-actief chunk like shown in the top of code.
<?php
/* DittoDetails
chunk detail-actief:
<a href="[~[+id+]~][+start_page_var+]">some link</a>
*/
// how many documents to summarize
$ditto_summarize = '9';
// get the chunk
$detail_actief = $modx->getChunk( 'detail-actief' );
// determine the start page
// if start is empty, defaults to 0
$start_page = ( !isset( $_GET['start'] ) ? '0' : intval( $_GET['start'] ) + $ditto_summarize );
// determine initial url var seperator
$url_sep = $modx->config['friendly_urls'] =='0' ? '&' : '?';
// populate the [+start_page_var+] placeholder links in the chunk code
$detail_actief = str_replace( '[+start_page_var+]', $url_sep.'start='.$start_page, $detail_actief );
// set up the ditto snippet params
$ditto_params = array(
'parents' => '5',
'total' => '99',
'showPublishedOnly' => '1',
'orderBy' => 'menuindex ASC'
'tpl' => 'detail',
'tplCurrentDocument' => '@CODE:'.$detail_actief,
'summarize' => $ditto_summarize,
'paginate' => '1',
'paginateAlwaysShowLinks' => '1'
);
$output ='';
// get the snippet output
$output = $modx->runSnippet( 'Ditto', $ditto_params );
return $output;
?>
[ed. note: breezer last edited this post 10 years, 10 months ago.]