From a909a143bcaa0203a861a73dfe027fe20fdbca5c Mon Sep 17 00:00:00 2001 From: curmudgeon61 Date: Tue, 14 Feb 2012 10:57:13 -0500 Subject: [PATCH] Update core/components/getfeed/snippet.getfeed.php --- core/components/getfeed/snippet.getfeed.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) . '
'; }