Zieglers

Just little about C#, .NET, SQL Server, SharePoint and SAP

Add Blog Posts web part to Team Site page

Posted by zieglers on March 5, 2009

the-computer-demands-a-blog

If you want to add posts web part to your team site – assuming that you have your blog site as subsite (named as “blog“) – you can do this as follows:

1. Create a doc library called Pages, default doc temlate is Web Part Page.
2. Create a page called Test.aspx.
3. Open Notepad, paste following web part code and save this code as Posts.webpart.

postswebpart

4. Change List ID for Posts list in blog site.
    Find 43EBBD67-B3EB-4D9F-89C7-B84520A40991 and replace with your blog site’s posts list id.

5. Then, go to your team site web part galleries and upload this Posts.webpart.

6. Add this web part to your Test.aspx.

Now you should be seeing Posts from blog site. :)

P.S. Before writing this reply, I tested above steps one by one myself and it’s working.
Let me know if you encounter any problems.

zieglers

About these ads

10 Responses to “Add Blog Posts web part to Team Site page”

  1. eyeguynm said

    I downloaded your code, inserted the appropriate List ID from the “Post” list in my blog but I receive the following message: “Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.”

    Do you have any suggestions? I’ve triple checked the List ID…

    Thanks!

    Curt

    • matsonpp said

      The reason you are getting this message is because this web part assumes your blog lives at the following EXACT location:

      http://server/blog

      In order to customize this web part to your site, you must modify the several instances of “/blog/” in the web part file.

      Do a find and replace for /blog/ and replace it with the SERVER RELATIVE link to your blog site.

      For example, my blog site is currently at:

      http://server/sites/project1/blog/

      Therefore, I will be replacing /blog/ with /sites/project1/blog/

      Hope this helps.

      Kind regards,
      MatsonPP

  2. Can you tell me how I find the “List ID for Posts list in blog site.” I’m just not sure where to look. The Post list’s settings? Somewhere in SharePoint Designer? If you could give me more of a clue, that would help me out. Thanks,

    Tom

  3. mwchc said

    I am trying to add a blog to a team site and am having trouble locating my blog’s site list id with the one in the post.webpart. Please help.

    PB

  4. m00nchester said

    Great post! I got this working with no problems following your concise instructions.

    One question though…

    I need to remove the categories from the post. When I delete the categories the webpart errors (although the blog site remains fully functional). I assume the webpart code can be changed to accomodate this? If you could advise on the change I would be most grateful!

    Thanks

    Rob

  5. traffic grab review…

    Add Blog Posts web part to Team Site page « Zieglers…

  6. I am so close to getting this to work!! I see the web part on the page and it’s showing the following line of info: Posted at by Schoelen, Coleen | Category: | Comments ()

    But, I don’t see the blog, and it’s not populating any information in the above fields…

    Any ideas what I am doing wrong?

  7. myvideo downloader…

    [...]Add Blog Posts web part to Team Site page « Zieglers[...]…

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 48 other followers

%d bloggers like this: