We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b28d46e commit f73820eCopy full SHA for f73820e
snippets/feed/rss.php
@@ -15,6 +15,8 @@
15
<guid><?= \Kirby\Toolkit\Xml::encode($item->url()) ?></guid>
16
<pubDate><?= $datefield === 'modified' ? $item->modified('r', 'date') : date('r', $item->{$datefield}()->toTimestamp()) ?></pubDate>
17
<description><![CDATA[<?= $item->{$textfield}()->kirbytext() ?>]]></description>
18
+ <?php $image = $images && $imagesfield ? $item->{$imagesfield}()->toFiles()->first() : null;
19
+ if ($image): ?><enclosure url="<?= $image->url() ?>" length="<?= $image->size() ?>" type="<?= $image->mime() ?>" /><?php endif ?>
20
</item>
21
<?php } ?>
22
</channel>
0 commit comments