PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Drupal rss theme items

March25

The rss being generated has by default node title, author name and time. Now these rss items can be controlled on the html level (eg http://www.emirateslitfest.com/blog/feed) by manipulating the node.tpl files (use node-blog.tpl for content type blog, node-page.tpl for content type page and so on so forth).

But when we view the rss feeds in feed readers like google reader etc the changes made by node.tpl is not reflected. The solution for this is to hack the view-rss.module file (modules/views/view-rss.module).

Find line

array(’key’ => ‘dc:creator’, ‘value’ => $item->name)

replace with

array(’key’ => ‘dc:creator’, ‘value’ => ‘ ‘)

This will prevent the author name to be generated in xml file hence preventing feed readers from picking it.

Note: If you need to add cck fields in your rss feed use comtemplate. This even help to theme the rss field along with the teaser and body display.

posted under Drupal

Email will not be published

Website example

Your Comment:

 

12,831 spam comments
blocked by
Akismet