From 8cd5f84a8624196e86ffa58743d4d8f84207233e Mon Sep 17 00:00:00 2001 From: Jiri Pavlicek Date: Tue, 6 May 2014 22:12:50 +0200 Subject: [PATCH] added support for RSS feed fields containing ":" char (for example ) - snippet cannot store array value to placeholder, my solution adds new field with name created from key form first level array and second level array (for example RSS field can be accessen in placeholder [[+cd-creator]] and so on) --- core/components/getfeed/snippet.getfeed.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/components/getfeed/snippet.getfeed.php b/core/components/getfeed/snippet.getfeed.php index f54c2eb..f726b79 100644 --- a/core/components/getfeed/snippet.getfeed.php +++ b/core/components/getfeed/snippet.getfeed.php @@ -29,6 +29,13 @@ $idx = 0; while (list($itemKey, $item) = each($rss->items)) { if ($idx >= $offset) { + foreach ($item as $k => $v) { + if (is_array($v)) { + foreach ($v as $k2 => $v2) { + $item[$k . '-' . $k2] = $v2; + } + } + } if (!empty($tpl)) { $output[] = $modx->getChunk($tpl, $item); } else {