I'm wondering if there's a way to make a view render an Atom feed with custom fields, that would output something similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" ... xml:lang="en-US">
   <title type="text">my atom feed</title>
   <subtitle type="text">my atom feed subtitle</subtitle>
   <id>the feed's url</id>
   <rights type="text">some copyright</rights>
   <generator>my feed generator</generator>
   <link rel="alternate" type="text/html" href="my site's url" />
   <link rel="self" href="the feed's url" />
   <entry type="my_type_1">
      <id>an article's url</id>
      <title type="html">article title</title>
      <summary type="html">article summary</summary>
         <uri>the guy's bio page url</uri>
      <content type="html">full body content in &lt;strong&gt;html&lt;/strong&gt;</content>
      <my:yet_another_custom_field>hi there</my:yet_another_custom_field>
   <entry> ... </entry>

The views_rss module can do stuff like this (in fact, I've already accomplished a lot using its hooks to define the fields, and field formatters to do stuff like <author><name>name taken from a user reference field in the node</name><uri>the user's url</uri></author>, but I can't find a similar module that provides the same functionality for Atom feeds.

Is there such a module out there? I've tried atom and views_atom without success. If not, how hard would it be to implement it? I guess this would involve making a "views plugin", with which I'm not really familiar.


You don't need a module to do that. You can use .tpl files to wrap rows in <entry> tags, fields in their tags and so on. It may be a bit less intuitive and more exhausting at first, but in the long run you will get exactly what you ask for, without compromises modules call for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.