Drupal has a lot of methods for showing RSS urls. But by default /node is the only feed that shows up as alternative
<link rel="alternate" type="application/rss+xml" title="RSS" href="node/feed" />
This is far too limiting IMO. We should have a unified method for showing alternative urls, and the [xml] button.
my proposal:
on each and every url look for:
/feed/theurl/
if that returns a feed, make that the <link rel="alternate" header, either instead of, or in addidion to the standard RSS url.
that should go in combination with a _feed hook. The feed hook could look like (its psuedo code, just to show the idea):
function taxonomy_feed($op='header', $url=NULL) {
$operator = arg(2);
if($op='rss') {
$output = taxonomy_make_feed($operator);
}
elseif($op = 'header') {
if(taxonomy_feed_has_items($operator)) {
$output = '<link rel="alternate" type="application/rss+xml" title="RSS" href="feed/'. $url .'" />;
}
}
return $output;
}
If anyone else sees better options to unify and centralise the feed and feed-header generation, please suggest them.
Comments
Comment #1
drummMy plan is to unify all node listing pages to be handled by a single system. There can be a system to hook into that for alternative views and blocks. RSS, ATOM, and archive browsing are the obvious alternative views for me. I would probably make the URLs consistent with the current system for the front page, appending /feed for rss. This happens to work well with menu hierarchy idea as well. I doubt I will have time for this in the next month or so, and I already have one pending 100+ line patch and 4 others.
Comment #2
Bèr Kessels commentedhttp://drupal.org/node/9167 discusses something similar
Comment #3
Bèr Kessels commentedThis is a proposal for a feedcentral I made. IMO thats the way this should be handled.
Comment #4
Bèr Kessels commentedthere is a modukle that does this.
Comment #5
(not verified) commented