The News Feed Module
Introduction
The news module provides a resoure type which displays a list of the document's children, in descending order of the creation date. The child documents are treated as news messages. The news can also be rendered as an RSS feed.
Formats
The news resource type provides the following formats:
- xhtml
- The usual XHTML page. It shows a list of the child documents, including the title and first paragraph.
- include
- An XHTML snippet. The view is equal to the
xhtml
format, but the content is included in an<xhtml:div id="news"/>
element. This format can be used to include the news items in other pages, typically using CInclude. The number of included items is determined by theincludeItems
attribute of the<col:collection/>
element. - rss
- The RSS view of the news items.
- header
-
The RSS header (
<link rel="alternate" type="application/rss+xml" ... />
), pointing to the RSS feed. This is used, e.g., for Firefox' "live bookmark" feature.
Aggregating Multiple Newsfeeds
If you add news documents as children of a parent news document, the parent automatically aggregates and merges the news items of its children, ordered by time. For example:
/news /national /n1 (2007-05-03) /n2 (2007-05-01 /international /i1 (2007-05-02) /i2 (2007-04-26) /sports /s1 (2007-05-04) /s2 (2007-04-13)
will result in the following list of news items displayed at the /news
level:
- s1
- n1
- i1
- n2
- i2
- s2
The includeItems
setting of the collection
resource type
is applied to the result list when it is requested using the include
format.