bnomei / kirby3-feed

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

Add option to modify item title #20

Closed sebastiangreger closed 5 years ago

sebastiangreger commented 5 years ago

Hi. Just like my earlier issue and PR from July (Thank you for inclusion upstream!), I ran into yet another modification needed for a client project: on the site in question, the title field may contain <br> tags, which I filter out using a custom Field Method. In order to display the filtered title in the RSS feed (replacing the <br> with a blank space), I had to change the source of the title used for the items in the feed (not item()->title(), but item()->customFieldMethod()).

I'll submit a PR for your consideration, but do of course understand if this adds too much complexity to your otherwise simplistic plugin. Also, I am not 100% sure is this the semantically correct way, since the value in the new variable is not actually a field name (as with the others), but the name of a method.