I am developing module that uses nodeapi to add two additional fields to nodes. How can i include these two new fields in the rss feed for the node?

Thanks

Comments

jsaints’s picture

on the page:

http://drupaldocs.org/api/head/function/node_feed

its says that using 'rss item' in the nodeapi section of the module will do the trick.

jsaints’s picture

here is the code I place in the hook_nodeapi(&$node, $op, $teaser, $page) function

case 'rss item':
    if (variable_get('hook_'. $node->type, TRUE)) {
       $extras = array();
       $extras['extrafield'] = $node->extra_field_value;
       return $extras;
      }
    break;