diff --git a/core/components/getfeed/snippet.getfeed.php b/core/components/getfeed/snippet.getfeed.php index f54c2eb..70eaade 100644 --- a/core/components/getfeed/snippet.getfeed.php +++ b/core/components/getfeed/snippet.getfeed.php @@ -30,7 +30,11 @@ while (list($itemKey, $item) = each($rss->items)) { if ($idx >= $offset) { if (!empty($tpl)) { - $output[] = $modx->getChunk($tpl, $item); + if (!empty($tplLast) && $limit > 0 && $itemIdx+1 == $limit) { + $output[] = $modx->getChunk($tplLast, $item); + } else { + $output[] = $modx->getChunk($tpl, $item); + } } else { $output[] = '
'.$idx.': ' . print_r($item, true) . '
'; }