By mikesuttie on
Hey there.
I'm trying to override the way the description element of each RSS item is put together. I want it to have the body text from the node in the description and any image referenced in an enclosure tag (example at the bottom). Drupal seems to produce quite messy rss with a lot of html tags, any way of getting rid of these?
Any help would be greatly appreciated, cheers.
RSS example of what i want!:
<item>
<title>PropertyDetails</title>
<link>http://www.propertydirections.co.uk</link>
<description>An immaculate three bedroomed end terraced house situated in
Ryhope Village. The property benefits from gas central heating, double glazing.
Briefly comprises: Entrance Hall, Kitchen, Downstairs Cloakroom, Living/Dining
Room, 3 Bedrooms and a Bathroom. Externally there are gardens front and rear,
garden storage and an allocated parking space. Viewing highly recommended. Vendor works within the Directions Group. Price: GBP 149950</description>
</item>
<item>
<title>Plan1</title>
<link>http://www.propertydirections.co.uk</link>
<enclosure url="ftp://propertydirections:st55bxvf@housescape.org.uk/images_p/PRD1000184P1.jpg" type="image/jpeg"></enclosure>
</item>
Comments
Not really
Not really
You will have to try to patch format_rss_item() yourself.
... or replicate the functionality yourself in a custom module.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Thats what i thought
Thanks for your response
I've been trying to modify that function in common.inc, but however I change it doesnt seem to affect the rss in any way whatsoever. Also there it states there is a function that strips the html but it clearly doesnt. This leads me to believe that the rss is being formatted elsewhere
Contemplate module
have a look at http://drupal.org/project/contemplate
It can theme CCK (and other node types) teasers, bodies and RSS feeds (which will look like the teasers actually).
Nice mod, only pity that is difficult to integrate sometimes with other contrib modules that add content to nodes (Userreview, Image, Voting,...). Still workarounds for most of them are possible.
Anyhow i am still looking.. no other "easier" solution to this issue possible? :o
Cheers
-Marco
Interesting
I'm just looking at contemplate now. Too early for an opinion - but I REALLY need something like this.
Our site (www.sportbusiness.com) has abuot 25,000 news items and about 240 categories, however due to the way CCK, Taxonomy and Views integrate - the RSS gets pooched a lot. Quite a few pages fail to generate acceptable RSS. This is becoming ever more important as news aggregators see the site.
Not Contemplate... Nodeapi!
Take a look here http://drupal.org/node/87430
selective raw xml output
This is a crossposting of my comment at http://drupal.org/node/63883#comment-159945, which seems to adress the same problem.
I've been playing with contemplate/CCK nodes/Views to create an RSS feed to 'power' a GoogleMap view of my nodes. Using the theming capabilities of contemplate, I can get a 'clean' output of my InfoWindow on the map (or so it seems for now).
However, when I view the raw output of the xml file it still displays a lot of 'overhead' (won't use that other word).
What I wat is a 'clean' output of just the xml data I need and nothing more. See also the posting by mikesuttie at [here] where he gives more or less the layout what I need.(going to crosspost)
Kitealtas posted an inssue on the subject (http://drupal.org/node/87027), without any followup.
Is there any (new) information on how to format the feed itself?
Followup: I found this thread http://drupal.org/node/41703 which might be useful, have to check. might be over my head though...