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.

Bookmarking, greetings,

Summit - September 24, 2008 - 14:27

Bookmarking, greetings, Martijn

I'd like to think that I

roysteves - October 9, 2008 - 16:37

I'd like to think that I would have come up with this on my own, but you prevented the need! Over a year later, your post is still helping people, Gwen! Thanks!

Roy Steves

default case

roysteves - October 9, 2008 - 17:26

Oh, and I have the default case use variable_get('feed_item_length', 'teaser'); so the original admin setting still applied where it would have before. Makes it backwards compatible!

Roy Steves

subscribing...

lsabug - February 16, 2009 - 23:00

thank you

This is a very obsolete

gausarts - June 14, 2009 - 10:09

This is a very obsolete thread, but I would like to tell just in case somebody else needs custom rss theming with Views 2. It's all there now. Add a display type: Feed and just find Theme:Information in the Basic Settings Tab, and all is ready to customize. Don't forget to rescan the files so that Views knows the new ones.

Hi, what do you mean, by

Summit - June 14, 2009 - 12:24

Hi, what do you mean, by rescanning files...? emptying cache or differently?
Greetings, Martijn

Greetings,
Martijn
if you appreciate e-development work, please place a link from your site to www.trekking-world.com

Oops, missing something here

gausarts - June 14, 2009 - 18:41

I was referring to @gwen.

I guess I missed adding "views-view-rss.tpl.php".

Let me say it clear:

  • Add a display type: Feed
  • find Theme:Information in the Basic Settings Tab, you'll find views-view-rss.tpl.php
  • Copy the style output content and put it in a file views-view-rss.tpl.php which you must create and add into your theme folder. Customize anything.
  • And then rescan the file, simply by clicking button "Rescan template files".

    When adding, removing, or renaming template files, it is necessary to make Drupal aware of the changes by making it rescan the files on your system.

love, light n laughter
gausarts

 
 

Drupal is a registered trademark of Dries Buytaert.