Hi,
Sorry, I’m not good at explaining these things.
Perhaps better if I show you:
//Cycle through the results.
for($i=0; $i < $rssFeedLimit; $i++) {
//Assign the data
$rssUrl = $xml->channel->item[$i]->link;
$rssTitle = $xml->channel->item[$i]->title;
$rssDesc = $xml->channel->item[$i]->description;
// Set placeholders:
$modx->setPlaceholder(’rssUrl’, $rssUrl);
$modx->setPlaceholder(’rssTitle’, $rssTitle);
$modx->setPlaceholder(’rssDesc’, $rssDesc);
// Return the chunk
return $modx->getChunk(’rssListResult’);
}
Is it possible to ’combine’ chunk data? In my rssListResult chunk I have the following:
<a href="[+rssUrl+]">[+rssTitle+]</a>[+rssDesc+]<br />
However, the above code only outputs the first result. When I attempt to use $ouput .= $modx->getChunk(’rssListResult’). It just outputs the same thing x amount of times.
I probably have something out of place, but cannot figure it out. Can anyone shed some light on this for me?
Thanks.