bnomei / kirby3-feed

Generate a RSS/JSON-Feed and Sitemap from a Pages-Collection.
https://forum.getkirby.com/t/kirby3-feed-rss-json-sitemap/23574
MIT License
64 stars 8 forks source link

Pulling other fields, not just content_html #29

Closed jonwgeorge closed 3 years ago

jonwgeorge commented 4 years ago

Is there a way to pull other custom fields with this, not just content_html. Would like to use this as a basis for a calendar, but need to pull references to a start and end field as well.

bnomei commented 4 years ago

you can use a custom snippet and forward whatever data you need via the options

$options = [
                    'title'       => 'Latest articles',
                    'description' => 'Read the latest news about our company',
                    'link'        => 'blog',
                    'mycustomvar' => page('other'),
                    'summaryField' => 'crazy', // use this field in you snippet <?= \Kirby\Toolkit\Xml::encode($item->{$summaryField}()) ?>
                    'snippet' => 'feedWithSummary', // site/snippets/feedWithSummary.php
                ];
                $feed = page('blog')->children()->listed()->flip()->limit(10)->feed($options);
                return $feed;

At least thats how i think it should work. :sweat_smile:

bnomei commented 4 years ago

if you need real ICS files... this might be the better choice: https://github.com/bnomei/kirby3-ics

dcschmid commented 4 years ago

Is it possible to add an author or the article tags to the rss feed. I need it to send push notifications with articled.io.

bnomei commented 3 years ago

see #34 and #36. please use a custom snippet.