Creating an Atom Feed - Documentation topics on: atom,build rss feed,feeds,howto,rss,rss feeds,.

Creating an Atom Feed

The Atom Syndication Format is an XML language used for web feeds. Here's an example of how to take a dotCMS content type and create a widget to display an Atom feed.

Follow the next steps using the "News" content type from dotCMS' starter site:

  1. Click on the Site Browser tab and select a folder, then right click on it and click on: New --> HTML Page. 
  2. In the Add/Edit HTML Page screen enter the following information and click on Save.

    Note: You need to use a Blank Template (a template that doesn't have any headers or HTML only one container). 
  3. In Edit Mode, click on a Body Container: Add Content button and select "Add Widget". 
  4. A dialog box will display, select the widget type: Simple Widget on the left column and then click on "Create New Simple Widget".
  5. In the "Add/Edit Simple Widget" screen, enter the title: News - Atom Feed. In the code field use the following code and click on Save. The code creates the feed by outputting the xml tags required for the feed and by doing a content query on all News items. You can modify the content query to pull any other content you want to display on the feed. 
    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="">
            <title>News Feed</title>
            <subtitle>Atom Feed Example.</subtitle>
            <link href="" rel="self" />
            <link href="" />
            #foreach($con in $dotcontent.pull("+contentType:News",10,"title asc"))
                    <link href="${con.urlTitle}" />
  6. You can now preview your feed by clicking on the "Preview" tab. This feed can be used by other sites to ingest dotCMS content and be displayed in external websites. Click on Publish Page to make your feed live. The feed can be accessed using an RSS reader.

Note: Here you can find more information about required and optional fields on your feed.