2

Using SharePoint Online...

I want to display posts from a blog subsite on my top level site. I have added a Content Query web part, and managed to get the links to the blog posts to display, but I really want the whole content of each blog post. Title, author, date, image, text etc.

Any ideas?

1

In order to achieve that I would rather go for

| improve this answer | |
0

In addition to the previous mentioned source: Mark Anderson has a good post on this topic tool. Displaying Bog Posts in Different Sites in SharePoint 2010

| improve this answer | |
0

I would recommend to use Content By Search web part. You'd have to create two display templates, one for control and one for item. Since all the properties you're pulling are already mapped, you wouldn't need to create managed properties. To get the image (first image) from your blog, use the following in your ManagedPropertyMapping.

'Picture URL'{Picture URL}:'BodyOWSMTXT'

Here's a sample that pulls image out of body and makes use of image rendition.

var pictureURL = $getItemValue(ctx, "Picture URL");
var pictureId = encodedId + "picture";
var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 150, 150, ctx.CurrentItem, "img-circle", line1, pictureId);
var pictureURLWithRendition = Srch.U.getImageSourceWithRendition(pictureURL, 150, 150);

There are plenty of sample on github SPCSR to get you started. The out of the box 3-line display template is a good start. The only disadvantage I can think of this approach is the time SharePoint takes to index the new content since it's based on search.

| improve this answer | |
0

I have created a subsite > Blog and called it News and then used the NewsWebPart in the main page to pull / display news from the blog.

enter image description here

The NewsWebPart needs to be activated within the Features, I believe.
A friend of mine has done this for me and I remember bits and bobs...

enter image description here

The above is the config for the NewsWebPart.
The image is not embedded by default, which needs creating first etc.

Maybe this might give a hint

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.