Does any one know how to replace the node link with the actual article link.

<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://parrishconsultinggroup.com/candidate-feed" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Candidate Feed</title>
    <link>http://parrishconsultinggroup.com/candidate-feed</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Districts Bracing for Open Enrollment (Register Guard)</title>
    <link>http://parrishconsultinggroup.com/node/3</link>
    <description>&lt;div class=&quot;field field-name-field-articlelink field-type-link-field field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Article Link:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;http://www.registerguard.com/web/updates/27145078-55/students-districts-district-schools-transfer.html.csp&quot; rel=&quot;nofollow&quot;&gt;Districts Bracing for Open Enrollment (Register Guard)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-field-date field-type-datetime field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;Article Date:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;span class=&quot;date-display-single&quot; property=&quot;dc:date&quot; datatype=&quot;xsd:dateTime&quot; content=&quot;2011-12-19T00:00:00-08:00&quot;&gt;Monday, December 19, 2011&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
     <pubDate>Mon, 19 Dec 2011 22:15:19 +0000</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">3 at http://parrishconsultinggroup.com</guid>
 <comments>http://parrishconsultinggroup.com/node/3#comments</comments>
  </item>
  </channel>
</rss>

Mark

Comments

markp2000’s picture

markp2000’s picture

The before mentioned link worked perfectly. Remember to clear your cache.

I created a custom module. My custom content type had a field_articlelink field I used to swap out with the nodal link.
Also replace machine_name_here with the content type you are trying to modify.


// $Id$

/**
 * @file
 * A module the will use the actual article link as opposed to the nodal link
 * 
 * This module will switch the actual article link with the nodal link
 */
 
/**
 * Implements a custom node view for rss feed
 */
function rss_actual_node_view($node, $view_mode, $langcode) {
  if ($node->type == 'machine_name_here' && $view_mode == 'rss') {
    $node->link = $node->field_articlelink[$node->language][0]['url'];
  }
}

Mark