Hello again Bruno!
And thx for the help once more! Sure, the "Rand()" was only for getting different results for testing purposes, but I think too this might be "confusing" (but a test showd me it works too).
So to start with the result of I, when I choose another value vor the "limit", I have to choose the limit-value as the multiplication-amount minus "limit-value minus 1"...
Now I'm asking myself if it's possible to look for the parent inbetween the snippet and only "create" the idx-value for all resources that are inside the parent 4 for example. Or the "chunkname" would be useful too, as I use the &tplCondition and &conditionalTpls-function inside my getPage-call.
I found this:
/* ***************************************** */
/* CHUNKS */
/* ***************************************** */
/* get simple chunk */
$modx->getChunk('ChunkName');
/* parse a chunk many times */
foreach ($docs as $doc) {
$output .= $modx->getChunk('teaserTpl', $doc->toArray() );
}
return $output;
but I'm still trying to sort out how it's used and how i might be able to combine this with the snippet-code you provided
So thanks a lot again to you so far!