Drupal's core RSS handling adds a link to each taxonomy term's page using the optional "domain" attribute on category tags. The attached patch adds support for this behavior by modifying the category preprocessor to recognize links. To use it with a view, configure the Taxonomy field with "Link this field to its term page" checked.

The patch also modifies views_rss_htmlspecialchars to handle multiple elements, which was necessary so that it could be moved to run after the category preprocessor.

A secondary benefit of this patch is that terms with commas will be parsed correctly. Currently, terms with commas get broken apart.

views_rss-category_links.patch3.86 KBkas
Members fund testing for the Drupal project. Drupal Association Learn more


maciej.zgadzaj’s picture

No, I don't like this, it is still too much based on what core Views is returning. But to tell the truth - I don't like current implementation either - it always was only a temporary solution, and I was thinking (and still am) about doing it properly - which would mean extending views_handler_field_term_node_tid class and adding proper formatter. Should happen soon, as this is one of two things I still want to add before releasing rc3.

maciej.zgadzaj’s picture

Status: Active » Fixed

New Views field handler views_rss_handler_field_term_node_tid providing RSS <category> element formatter with option to configure domain attribute for item category element has been added in the most recent 6.x-2.x-dev branch, just pushed (at the same time this version will most probably become rc3, if neither me nor anybody else will find any bugs in it soon). D7 version to follow.

kas’s picture

Cool, much better than my patch. I've run into one bug in views_rss_handler_field_multiple and will submit a patch shortly.

maciej.zgadzaj’s picture

Could you share what the bug is? Ah, nevermind, just spotted the other issue...

kas’s picture

The bug is in its own issue: http://drupal.org/node/1528774

Also, I was just thinking that the docs at http://drupal.org/node/1346498#category might need to be updated for this change after the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.