Rss Feed On Keyword Snippet

Create a RSS feed returning the last 20 pages containing a specific keyword.

Code

$response.setContentType("text/xml")
#set ($sql = "where doc.content like '%keyword%' order by doc.date desc")
#set ($list = $xwiki.searchDocuments($sql , 20 , 0))
#set ($baseurl =  "http://${request.serverName}")
#includeForm("XWiki.WebRssCode")

You can also check the code for XWiki.WebRssCode.

To get the RSS feed without the skin being applied to the page, append "?xpage=rdf" to the URL pointing to your page.

Version 4.1 last modified by VincentMassol on 09/12/2007 at 15:05

Comments 2

EricVanDerVlist | 13.03.2007 at 06:37 PM
I am trying this snippet (in a 1.0 beta 5 release) and I get the RSS feed embedded in a normal page.

How do I say that I don't want to apply the normal formatting to this page?

Also, were can I see the code of XWiki.WebRssCode?

Thanks,

Eric


VincentMassol | 13.03.2007 at 10:50 PM
Hi Eric,

I've added the information to the page.

Thanks -Vincent

Attachments 0

No attachments for this document

Creator: VincentMassol on 2006/12/12 09:50
This wiki is licensed under a Creative Commons license
1.4.1.10194