Fetch blog posts from another space

25 views
Skip to first unread message

Guy Verville

unread,
Jan 28, 2020, 8:05:53 AM1/28/20
to Scroll Viewport Developers
Hi,

This is probably pretty basic, but I have difficulty getting blog posts from another space.

I want the blog posts of my space "PAR" to be listed on our home page. I understand that $blogPosts is for the actual page itself, hence this code should work in that context.

#foreach($blogPost in $blogPosts)
<h2>$blogPost.title</h2>
<p>Written by $blogPost.creator.username on $blogPost.creationDate("MMM dd, yyyy")</p>
        <div>$blogPost.content</div>
#end

I tried to fetch the blog of another space with this:                

#set ($blogs = $include.blogObject("PAR"))

and then loop with #foreach($blogPost in $blogs)

Nothing is showing. 

Steffen Burzlaff (K15t)

unread,
Jan 31, 2020, 3:55:12 AM1/31/20
to Scroll Viewport Developers
Hi Guy,

thanks for reaching out.
Unfortunately currently it isn't possible to grad the blog-content from a different space.
What is the exact use-case for doing that? Could you explain that, so we can improve our product?

Thanks and have a nice day.

Best Regards,
Steffen

Guy Verville

unread,
Jan 31, 2020, 8:50:45 AM1/31/20
to Scroll Viewport Developers
Hi, we are revamping our Confluence portal Home, but our internal blog is on another space ("PAR"). In Confluence, it's quite easy to use the blog macro and put it on the home page. We are using Lively Blog plugin to have a better presentation. However, we have now specific needs and we were hoping to manipulate the blog entries by ourselves. It's sad though that you don't offer this possibility since you have already the function .blog(spacekey, page) which retrieve the most recent entry...
Reply all
Reply to author
Forward
0 new messages