In my ongoing journey to create a customized RSS feed in my D8 site, I've finally gotten closest to what I need by using a Feed display in Views. The basic feed is working, but I need to add a couple custom elements for each item. So based on the fact that the rss fields are rendered in the RSSFields class (\Drupal\views\Plugin\views\row)
namespace Drupal\video_export\Plugin\views\row;
use Drupal\views\Plugin\views\row;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
/**
* Renders an RSS item based on fields.
*
* @ViewsRow(
* id = "mycustom_rss_fields",
* title = @Translation("My Custom Fields"),
* help = @Translation("Display fields as RSS items."),
* theme = "views_view_row_rss",
* display_types = {"feed"}
* )
*/
class MyCustomRssFields extends RssFields {
public function render($row) {
parent::render();
}
}
So when I place this in /modules/custom/video_export/src/Plugin/views/row
, if I go to select the style, I see my new plugin, but when I click Apply, nothing happens. Is there anything else I need to add to my override to get it to save?