Offering a full rss feed and a snippet feed - how?

allen074 - February 14, 2007 - 19:37

Ok - I need to offer a full feed of my site - and a snippet feed - anyone know how to set this up?

Right now, I have just the snippet feed.
http://www.centernetworks.com/rss.xml

Thank you in advance!

anyone please? i would

allen074 - February 15, 2007 - 03:29

anyone please? i would really love to get this working!

if i have to pay - i can pay a few dollars.

thank you

i am now on my knees

allen074 - February 15, 2007 - 15:13

i am now on my knees begging!

Views

Richard Eriksson - February 15, 2007 - 22:18

I bet you could do this with the Views module, that is, create a view of full nodes with an "RSS: RSS Feed Selector" argument. http://drupal.org/node/83597 has some instructions around that.

thanks - i hired someone to

allen074 - February 17, 2007 - 23:10

thanks - i hired someone to do it since i don't really understand the views module.

We're trying to do the same

bsimon - May 17, 2007 - 11:29

We're trying to do the same kind of thing. We want to provide our RSS feeds with just a teaser view, but we need one special feed (for syndication) with the full node body

I bet you could do this with the Views module, that is, create a view of full nodes with an "RSS: RSS Feed Selector" argument. http://drupal.org/node/83597 has some instructions around that.

This should be the way to do it, but it doesn't seem to work, at least in 5.1. The RSS feed length (full/snippet) appears to be determined by the setting in the RSS Publishing page alone, and nothing I changed in Views makes any difference:

The page that controls the RSS length is Administer » Content management » RSS publishing

And changing the settings in Views seems to have no effect

I tried these settings:

View Type to Full Nodes (and List View and RSS Feed),
Node: Body to Full Text,
RSS Feed Selector to Display All.

Tried various combinations of these, and using a Node: Feed Selector Argument too, but nothing worked.

I also tried the opposite, though this isn't really suitable for us:

First setting RSS Publishing to Full Text,
and then setting View Type to Teaser List,
Node Body to Teaser,
Feed Selector to Summary

but again the only setting that made any difference to the output was the RSS Publishing page.

Maybe the problem is just that there are so many options in Views drop down lists that appear related to this, that although we tried a lot of things, we still haven't found the right combination yet.

you also need to do some themeing

gwen - July 3, 2007 - 03:57

You can do it with the "RSS: RSS Feed Selector" argument or with the "Views RSS: RSS feed" page view, but you also need to do some themeing b/c the module sets the feed type based on a global setting. It's modifiable here if you're looking to make a site wide change:
http://www.example.com/admin/content/rss-publishing

If you need different types of feeds, tho, you need to override theme_views_rss_feed(), which can be found in views_rss.module. To theme it out, I copied the entire function to template.php and renamed it mytheme_views_rss_feed() so I wouldn't have upgrade problems with views_rss. Once I had it somewhere I could safely modify it, I modified line 15 to call a custom function instead of using the global setting:

$item_length = variable_get('feed_item_length', 'teaser'); //old line 15

becomes:

$item_length = mytheme_views_rss_feed_map($view->name);  // new line 15

The new function allows me to set which pages should show full nodes, teasers or titles:

// this function determines whether to display full, teaser or title view in views rss
function mytheme_views_rss_feed_map($view_name) {
  switch ($view_name) {
    case 'some_full_node_view_name':
    case 'some_other_full_node_view_name':
      return 'fulltext';
      break;
    case 'some_title_node_view_name':
    case 'some_other_title_node_view_name':
      return 'title';
      break;
    default:
      return 'teaser';
      break;
  }
}

Replace the cases above with the correct page names and you should get some views with teasers, some with full nodes. Also, with some modification, you can use $view->vid instead of $view->name if you want to give yourself the flexibility to change view names w/o also needing to change code.

BTW, I'm running drupal 5.1, views_rss.module version 1.12.2.3. Steps may be different if your setup's not the same.

 
 

Drupal is a registered trademark of Dries Buytaert.