I've been struggling with trying to create a custom xml REST API in D8 to replace a simple Views RSS feed (that is imported into other D7 sites using a custom Feeds importer) in a D6 site that's being migrated, and after pulling my hair out with the custom REST endpoint, I'm looking at doing what I did in D6, which is to create a Views RSS display. However, the feed requires some customization, so I need to determine how to add custom fields to the RSS feed. For other feeds in D7 sites, I've used the Views RSS module to add fields, but the D8 branch is still apparently not stable, so that does not seem to be an option.
To customize my RSS feed, I need to do two things:
- Add custom elements (hook_nodeapi($op = 'rss item') in D6)
- Modify the query so only nodes with specified tids in a term reference field based on a views global null param passed in (hook_views_query_alter() in D6)
So it appears that for an RSS Feed display in D8 views, the only fields displayed in the feed are the ones predefined in the row style settings (using Fields as the row type). With the Views RSS module not being available, is there a way with core Views to override the view to add custom fields (such as a class override)? I appears I can still use hook_views_query_alter() to modify my query, but it doesn't do me much good if I can't add fields.
I could probably spend a few hours reading through code, but if anyone has a quick answer as to the best way to add custom elements to a D8 RSS display, or could point me in the right direction, I'd appreciate it.