How to expand SharePoint 2013 blog template
Standart SharePoint 2013 blog template contains App Web parts called Categories,
Comments, Posts and so on.
But if you want to
show blog authors in a separete web part (the same as Categories looks like) to
let end user to click on the author name to see his posts, you won’t find any
app parts or web part to to that.
First solution might be, you first sugestion in your mind, is to develop own web part. But this approach
could be time consuming, even if this task doesn’t seem so complex. I will show
you how to develop app web par tin other posts. Now we will use SharePoint
Designer 2013 and Links OOTB app.
- Open site you want to add blog authors web par tin SP Designer.
- Find Categories list and Category.aspx page
- Copy Category.aspx under Post list, as it shown in picture below
- Rename just copied page as you wish, inmy case I Renamed it to PostByauthor.apsx
- Open the page and click edit in Advance Mode.
- Replace string CategoryId with AuthorId
- Find and replace string PostCategory with Author.
- Save the PostByauthor.apsx.
- Right Click on PostByauthor.apsx and select “Properties”
- Copy path to the page and open it in browser
- You can get an error that some web part cannot be rendred, just remove broken web part and add a new one. (Blog tools)
- Now go to you blog main page and add Links app to the site
- Find user ID you want to add as an blog author (in my case it was 15)
- Add new item into Link list with url http:/hostweburl /sites/example/alexblog/Lists/Posts/PostsByAuthor.aspx?AuthorId=15
- Add user name in description.
- Add more links to the link list as much as you need, depends on blog author count. Don’t forget to change AuthorId of the end user .
- Place link web part on the page
Somebody can say that it is not convinent way to add blog authors
manualy. Yes, it is, but I can argue if you don’t have a lot of authors in the
blog, for example more then 20, and you know there won’t be more this approach
can work.
Next time I will show you how to create your own blog
authors SharePoint 2013 app
Link to next post
http://sharepointandaspnet.blogspot.com/2014/10/sharepoint-2013-blog-template-custom.html
Link to next post
http://sharepointandaspnet.blogspot.com/2014/10/sharepoint-2013-blog-template-custom.html
See you,
Have a good day! J
No comments:
Post a Comment