Ok, I see the logic on your answer, I tried it but didn’t get it working
This is what I got so far:
foreach ( $rss->items as $item ) {
$modx->setPlaceholder("title", $rss->items[$i]['title']);
$modx->setPlaceholder("logo", $rss->items[$i]['kd']['imagelink']);
if (($i<$limit)&&($i>=$initial)) {
$outputFirst .= $modx->parseChunk($tplChunk, $modx->placeholders, '[+', '+]');
}
else if (isset($split)) {
$outputRest .= $modx->parseChunk($tplChunk, $modx->placeholders, '[+', '+]');
}
$i++;
}
$output[1] = $modx->setPlaceholder("Top10", $outputFirst);
$output[2] = $modx->setPlaceholder("Rest", $outputRest);
//return $output;
return $output;
Then on the resource I call the snippet and the two placeholders but doesn’t output anything.
I did several tryout and the snippet works just fine but there’s something wrong at parsing these placeholders, return them or call them from the resource.
Many thanks both of you!!