Re: [xwiki-users] RSS feeds for Space-specific blogs

2015-02-05 Thread Clemens Klein-Robbenhaar
On 02/03/2015 06:07 PM, Jamal wrote:
 Hi,
 
 I've set up a blog for a single space using the blog inside an existing
 space option, so the blog URL is .../xwiki/bin/view/MySpace/Blog
 
 As per the documentation, I added the following line to the HTTP Meta Info
 section in the space's admin options:
 
 link rel=alternate type=application/rss+xml title=Blog RSS Feed
 href=$xwiki.getURL('Blog.BlogRss', 'view', 'xpage=plain') /
 
 Now how do I generate an RSS feed for only the space blog?
 
 When I try .../xwiki/bin/view/MySpace/Blog/BlogRss?xpage=plain I get an
 unformatted HTML page.
 
 What am I doing wrong?
 

 You are trying to glue things together in a way that does not work.
The URL for viewing pages always has a form like xwiki/bin/view/SPACE/PAGE
you cannot use it to resolve to xwiki/bin/view/SPACE/PAGE/VIEW or the 
like.

Instead you will have the call the 'Blog.BlogRSS' page and try to see
if you can somehow cause it to display entries from a different blog but the 
main one.

So if you look at the code in the page Blog.BlogRss at
 http://localhost:8080/xwiki/bin/view/Blog/BlogRss?viewer=code

You can see it includes macros from a page Blog.RssCode
and the first macro to be executed is '#getTargetBlog' ... this sounds 
promising :)

If you check the actual velocity macro code in 
http://localhost:8080/xwiki/bin/view/Blog/RssCode?viewer=code, you can see the 
Blog to be listed is fetched from the 'blog' request parameter.

So in your case you should be able to say:

 link rel=alternate type=application/rss+xml title=Blog RSS Feed 
href=$xwiki.getURL('Blog.BlogRss', 'view', 'xpage=plainblog=MySpace.Blog') /

I have to admit I have not tried if it really works, but I think it should ;)

Cheers
Clemens

 Thanks,
 
 J
 
 
 
 --
 View this message in context: 
 http://xwiki.475771.n2.nabble.com/RSS-feeds-for-Space-specific-blogs-tp7593861.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] RSS feeds for Space-specific blogs

2015-02-05 Thread Jamal
OK, I see now. That' a nice, concise explanation. Thanks for taking the time
to walk me through that, Clemens. I'll give it a try shortly.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/RSS-feeds-for-Space-specific-blogs-tp7593861p7593878.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users