Hello devs,
Yesterday I've applied Marius's XWIKI-2149 patch "Extend the FeedPlugin to
allow the creation of RSS/Atom feeds from any source". New RSS urls with
this revamped mechanism are of the type
"/xwiki/bin/view/Space/DocRss?xpage=plain" (while the current way is
/xwiki/bin/view/Space/DocRss?xpage=rdf"). I propose we add an action that
return the "plain.vm" velocity template as entry point to render the
document, and map a new "/feed/" action to it. This would allow us for
example to have a blog feed URL like this : "/xwiki/bin/feed/Main/BlogRss"
when the blog will actually use this new mechanism for its feed.
I would also like to map an action with a more generic name to it, like
"/plain/". "xpage=plain" is for example used when we create
pseudo-REST
web services (for example, all the AJAX/gridview features in XE do use
URLs of that type). I believe it would be nice to have in the service
request URL only parameters linked to the actual service. Thus I would
propose we have something like
"/xwiki/bin/plain/XWiki/MyService?myparam1=myvalue&..."
I am +1 for doing this, WDYT ?
Now, I have a working version of this on my computer, but I'm not very
happy how it is done. basically, I followed the way the "attach" action
works : I added a PlainAction in com.xpn.xwiki.web that just returns
"plain" on render, and added the following action in struts-config action
mappings :
<action path="/feed/"
type="com.xpn.xwiki.web.PlainAction"
name="feed"
scope="request">
<forward name="feed" path="/templates/plain.vm"/>
</action>
Is there a nicer way of doing this with struts ?
(At first, I tried to use "global-forwards" like <forward
name="feed"
path="/templates/plain.vm"/>, but without success.)
Thanks,
Jerome.