|
Question
|
How do I include the contents of an RSS feed in a page?
|
|
Answer
|
To include an RSS feed content in a page use the rss macro
{rss:feed=http://www.ludovic.org/blog/index.rdf|count=10}
The macro can take the following parameters:
- feed: url of an RSS feed
- img: if 'true' and if feed has an image, image will be included
- align: if an image will be included, use this alignment
- css: if 'true', elements will be created with CSS styles; otherwise, static formatting methods will be used
- count: an integer, the maximum number of feed items to display
- full: if 'true', descriptions for each item will be included. Otherwise, just titles
- search: if 'true' and if feed has a search field, field will be included
Advanced users can get finer control over the feed content by working directly with the feed plugin rather than the feed macro:
\#set(\$myfeed=\$xwiki.feed.getFeed(\$feedUrl))
$myfeed then contains a SyndFeed object, whose members can be accessed in a Velocity or Groovy script.
|
Document data
Attachments: 0
No attachments for this document
Comments: 4
<style type="text/css"> .rssfeed { width: 300px; } </style>