Having to be able to put cck fields in the rss is an old topic: http://groups.drupal.org/node/9044, extra rss fields tried to solve it in Drupal 5.

What I found out is that this thing wants to be in view_rss.

My patch supports basic cck fields (text, number, decimal, ...) and basically anything until you want to output text.
Html formatting can break things (for example if you're using multiple values).

This is a really simple patch, but doing a lot of functionality, if we want to support fields better we need wrapper functions with callbacks, but I think it's a good starting point.

I had only limited amout of time, but if you want me to experiment more you can contact my company Pronovix.

Comments

Subscribing...

subscribe - what about cck file upload images?

This patch is really for just simple things, but potentially it can be upgraded.

+++ views_plugin_style_rss_fields.inc 2010-01-22 16:04:15.000000000 +0100
@@ -139,32 +139,36 @@ class views_plugin_style_rss_fields exte
+          switch($key) {
+            case $this->options['fields']['title']:
+                $item['title'] = $row[$key];
+                break;

Or how about more concisely:

$rss_key = array_search($key, $this->options['fields']);
if (isset($rss_key)) {
  $item[$rss_key] = $row[$key];
}
else {
  // no key has claimed this field
  $item[$key] = $row[$key];
}

I'm on crack. Are you, too?

Status:Needs work» Closed (won't fix)

Is this patch still needed? beta 4 is out. I cannot map the patch on beta 4 code anymore.

Title:Support for cck fieldsAllow arbitrary tags in field usage and output all views fields
Version:6.x-1.0-beta1» 6.x-1.x-dev
Assigned:Coornail» Unassigned
Status:Closed (won't fix)» Active

I want to open this back up since I see what the op was trying to request. He wanted there to be a way to be able to create arbitrary rss feed elements in the xml.

So for reference here is the current UI:

==Field usage=================
= Title:
= | Select v |
= Description:
= | Select v |
= Link:
= | Select v |
= Author e-mail:
= | Select v |
= Author name:
= | Select v |
= category:
= | Select v |
= guid:
= | Select v |
= pubDate:
= | Select v |
===============================

Where the "Select" contains each of the fields enabled for this view.

Here is a similar redesign of the UI that would accomplish arbitrary fields like the author wanted to obtain:

==Field usage=================
= Views Field 1:
= | Select v |
= Views Field 2:
= | Select v |
= Views Field 3:
= | Select v |
= etc:
= | Select v |
===============================

Where the select would contain:

Title
Description
Link
Author e-mail
Author name
category
guid
pubDate
Other

Most importantly is the "Other" option which would allow specifying one's own tag for the feed element. Please see semantic views for possible code to borrow for this and more ideas on the UI.

The current design really limits itself to containing only the fields that the maintainer feels should be in the module. I am sure there are other options for redesigning the UI too. This was just my idea on it.

StatusFileSize
new64.38 KB

Just want to add a quick mockup of how the field usage section would look if done like the above.

Status:Active» Closed (fixed)

Closing, as this is pretty outdated already, and new versions of the module provide all that functionality anyway...

Category:feature» bug
Status:Closed (fixed)» Needs review

I tried to do this in both the D6 Dev and D7 versions of this module, and found no way of creating extra tags. Can someone comment on how to do this without hacking the module?

Category:bug» feature
Status:Needs review» Closed (fixed)

Please do not re-open and/or change category of already closed issues - if you need help, just open a new ticket with relevant category (which in your case would be support request, not bug report).

Anyway, I guess you haven't read module documentation yet, especially the Adding custom elements and XML namespaces part - there you will find an explanation how to add custom feed elements. Additionally you could have a look into one of the sub-modules providing feed elements how it is done there (for example views_rss_code).