SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have blog for our management team. Assistants will be posting instead of the managers. I have created a column called "Author" which is "people/group" lookup field for the assistants to add a person (manager) as author. Now, instead of displaying Created by column, I want to display "Author" column in blog post web part as Author: Manager Name.

But I am not able to change the web part view. Is there way to add this to a blog post? Or to add it inside a blog post body as Author: Manager Name. ?

share|improve this question
up vote 2 down vote accepted

I went a little different direction to fix this problem before. I created a special webpart which allowed you to configure it to create a blog post as another user. Here is the meat of the code to accomplish that:

//UserId = string of full login name of manager/person you want the blog to be created by
//listView = SPView of the blog
using (SPWeb listWeb = listView.ParentList.ParentWeb)
    SPUserToken token = listWeb.AllUsers[UserId].UserToken;
    using (SPSite site = new SPSite(listWeb.Url, token))
        using (SPWeb web = site.OpenWeb(listWeb.ServerRelativeUrl))
            SPList list = web.Lists[listView.ParentList.ID];
            SPListItem item = list.Items.Add();
            string formUrl = web.Url + "/" + list.Forms[PAGETYPE.PAGE_EDITFORM].Url
            formUrl = formUrl.Replace(" ", "%20");
            SPUtility.Redirect(formUrl + "?ID=" + item["ID"], SPRedirectFlags.Default, Context);
share|improve this answer
don't Dispose SPWeb aquired from SPView in webpart. Also when reaquiring SPWeb from another SPUserToken it is faster to make it with listWeb.Site.ID and listWeb.ID. – dbardakov Mar 31 '15 at 21:25

You need to modify the aspx page with the webpart. Assume its default blog site and page is default.aspx.

  1. Open this page in Sharepoint Designer
  2. Select element with createdby info in "Design view"
  3. Select "Design" tab in List View Tools, then "Customize XSLT", then "Customize Item"
  4. Edit XSL as you wish, Save Page and voilа enter image description here
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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