Atom Feed

The following template can be used to provide an Atom 1.0 feed on your site. It assumes that you have a global set with the handle “globals”, with two fields: “feedAuthorName” and “feedAuthorEmail”.

If you save this in a template that ends with a “.atom” file extension, Craft will even serve it with an application/atom+xml MIME type.

<?xml version="1.0"?>
<feed xmlns="">

    <title>{{ siteName }}</title>
    <link href="{{ siteUrl }}" />
    <link type="application/atom+xml" rel="self" href="{{ url(craft.request.path) }}" />
    <updated>{{ now.atom }}</updated>
    <id>{{ url(craft.request.path) }}</id>
        <name>{{ globals.feedAuthorName }}</name>
        <email>{{ globals.feedAuthorEmail }}</email>

    {% for entry in craft.entries.find() %}
            <id>{{ entry.url }}</id>
            <link type="text/html" rel="alternate" href="{{ entry.url }}" />
            <title>{{ entry.title }}</title>
            <published>{{ entry.postDate.atom }}</published>
            <updated>{{ entry.dateUpdated.atom }}</updated>
                <name>{{ }}</name>
                <uri>{{ siteUrl }}</uri>
            <content type="html"><![CDATA[
                {{ entry.body }}
    {% endfor %}