0

I'm trying to customise the display of a blog post item (individual post) to add a "feature image" to the top of the post, and to change the Author to a custom People picker field.

From my understanding, an individual blog post's display is controlled by the blog.xsl file, which i cannot access on SP Online.

I have seen some solutions for customizing a blog post by:

  • Making a copy of blog.xsl, and referencing the custom blog.xsl in the webpart
  • Using javascript to alter the display

Even with following instructions, neither of these solutions have not worked for me on my SP Online test site or my SP 2013 test site.

Questions:

How do I go about adding custom fields to an individual Post?

I haven't seen any instructions on how to do this for SP2013, only for SP 2010 and 2007. Is that because there isn't a significant difference between Blog sites across versions/editions?

Edit/Update:

I think I have discovered what has been going on. I have managed to add custom fields to my on site SP2013 blog, but it reverts the view back to look the same at SP2010 blog.

I found a blog that says:

...out of the box, the SharePoint 2013 blog (and any other Document or List App) will use Client Side Rendering (CSR). CSR allows you to style lists and libraries using JavaScript. ... However, it means that the content is not semantic HTML on the page, rather it's a JavaScript object...

https://bradbrook-public.sharepoint.com/Blog/Post/7/Improve-the-SEO-of-a-SharePoint-2013-blog

I suspect that the only difference between a SP2013 blog and a SP2010 blog is the CSR/Javascript to change appearance and the html between versions is the same. Can anyone confirm this?

Also, I noted that applying a new CustomBlog.xsl removed the Like functionality. I assume then that the likes functionality is tied in with the js that changes appearance of the posts, so a new xsl means the javascript doesn't run.

.

NOTE: I'm still very new to xsl (Teaching myself, and getting there) and brand new to javascript.

3
  • propably you will go best by using displaytemplates. But by "customizing blog post" do you mean the homepage of a blog subsite with the "blogtools" webpart? If yes I could give you a starting point how to change the appearance of your blog posts. Even with new columns in the blog list. Nov 10, 2015 at 21:24
  • By customizing blog post i mean the individual post (where url is "{sitename}/blog/Lists/Posts/Post.aspx?ID=..."), rather than the posts on the blog subsite homepage (where url is "{sitename}/blog/default.aspx") Are displaytemplates for search rather than a CQWP? :/ P.S: Thanks for the speedy response @SebastianSchütze Nov 10, 2015 at 21:34
  • displaytemplates are for search and for lists also. On every whepart where you have the proerty "JSLink" or where you can choose displaytemplates in the properties pane of a webpart can use those displaytemplates. But for now I haven't found out how to use those displaytemplates on the "Post.aspx" page. Nov 10, 2015 at 22:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.