Creating / Modifying an RSS feed

Definition

Creating an RSS feed for a ploymod object permits generating an RSS feed containing an ensemble of data.  Generally it displays a list of the last elements published.

In order to edit an RSS feed, select an object from the module management interface, then click "new" or "modify".

Application management window

 

It is possible to create several RSS feeds for each object created with the Polymod module generator; their number is not limited.

Properties

When editing an RSS feed, the following fields are available:

RSS feed properties

Title :

Permits giving a name to an RSS feed.  This permits one to indicate the feed among all the available feeds for a polymod object.

Description :

Permits describing the RSS feed more precisely.  Often, each flux has a different display; the description can be useful for example to indicate the display which corresponds to the feed.

Address for the site feed:

An RSS feed can be used outside of your application, therefore if a user wants to access the source information, the user generally clicks on a link present on an element of the feed.  This link is defined by the field "Address for the site feed."
By default the site corresponds to the address of the current site.

Author:

Permits indicating the author of the RSS feed.
You can for example indicate the name of your site or the name of the person responsible for the feed.

Email the author

Permits indicating the email of the author so that users can contact him or her if necessary.

Copyright :

Permits specifying a copyright.

Categories :

List of terms, separated by commas, permitting one to categorize the RSS feed.

Update interval and frequency:

Permits readers of the RSS feed to to have a value indicating how often the thread is updated.
By default:  Once per day, minimum: twice per hour

XML Definition :

Permits defining the information to display on the RSS feed.

It is the heart of the RSS feed:  when the user accesses the feed from a link or feed reeder, the information that it recovers is the result of this XML definition.

For example one can choose to display the list of latest published news.
For this it is sufficient to effect a search for the News object, then order the results by date in reverse chronological order.

It is common to put a link to a page detailing the news, in case the reader wants to know more.

Dynamic help is available on the RRS feed editing page in order to create a feed simply and more easily.

Example of XML definition:

<atm-rss language="en">
    <atm-search what="{Blog}" name="rss">
        <atm-search-order search="rss" type="publication date after" direction="desc" />
        <atm-result search="rss">
            <atm-rss-item>
                <atm-rss-item-url>{page:5:url}?item={Blog:id}</atm-rss-item-url>
                <atm-rss-item-title>{Blog:Title:value}</atm-rss-item-title>
                <atm-rss-item-content>
                    {Blog:Introduction:htmlvalue}
                    <atm-if what="{Blog:Text:value}">
                        <a href="{page:5:url}?item={Blog:id}" title="Read more about '{Blog:label}'">Read more</a>
                    </atm-if>
                </atm-rss-item-content>
                <atm-rss-item-date>{Blog:formatedDateStart|rss}</atm-rss-item-date>
            </atm-rss-item>
        </atm-result>
    </atm-search>
</atm-rss>

Use:

Once an RSS feed has been created, it is interessing to create a link to use and/or to indicate to users that the feed exists.  This allows them to subscribe.

The link has the following form:

http://yourWebSite/rss/rss.php?id=RSSFeedId
The "id" parameter indicated in the URL defines which feed the rss.php will display.

You will find a list of identifiers available for an object in the dynamic help for this object:  consult the help for this object (from any row) and click on the object to display the help for the RSS fed.

For example, for a "News" object, go to any row, then to "XML Defenition", then click on "Help" and finally on the tab corresponding to the "News" module.
Then select the "News" object from  the dropdown list.  A dynamic help is displayed and one can see under the heading "Object features:" the list of RSS feeds available along with their respective identifiers.

Creating a link to an RSS feed

The link to a file rss.php is usually integrated into a polymod row using the following tag:

<atm-function function="rss" object="{News}" selected="rssId" attributeName="attributeValue">
    <a href="{url}" title="{description}">{label}</a>
</atm-function>

For an example, here is the link to the RSS feed for the Automne site: Read all the items RSS

 



Bookmark and Share

Top