Blog Post

Exchange Team Blog
3 MIN READ

Adding our Blog to your Sharepoint site

The_Exchange_Team's avatar
Mar 25, 2004

Here’s a handy tip for any Windows Sharepoint Services (WSS) aficionados out there… how to add a simple Blog web part into your team site.

Firstly, look at the top right of your WSS site – you should see a “Modify My Page” or “Modify Shared Page” link – click on the drop-down and you should be able to select ‘Add Web Parts’ then ‘Browse’. If you navigate to the end of the list of the team web site gallery, you should see the basic ‘XML Web Part’ which is part of the standard installation of WSS.

Drag & Drop the XML Web Part into one of your zones (the right one makes sense since it is typically narrower and used for links etc). Now, in the web part you’ve just dropped, click on the ‘open the tool pane’ link, and it will replace the list of parts at the right hand side with properties of the part you’ve just dropped.

Now you need to add the RSS feed URL for the Blog you’re interested in - http://blogs.msdn.com/exchange/Rss.aspx would be a good place to start – into the field under the ‘XML Link’ heading… this instructs the web part to fetch some raw XML which describes the content you’re ultimately going to be displaying. The next step is to add some XSL which will describe to the browser how to format the content being provided by the URL you’ve given already.

Click on the ‘XSL Editor’ and copy & paste the following XSL into the pane (don’t worry about the formatting).


<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<html>

<body>

<xsl:for-each select="rss">

<xsl:for-each select="channel">

<xsl:for-each select="item">

<xsl:for-each select="title">

<a>

<xsl:attribute name="href">

<xsl:value-of select="../link" />

</xsl:attribute>

<B>

<span style="color:navy; font-family:Tahoma; font-size:8pt; font-style:normal;">

<xsl:apply-templates />

</span>

</B>

</a>

</xsl:for-each>

<br />

<xsl:for-each select="pubDate">

<span style="font-family:Tahoma; font-size:8pt;font-style:italic;">

...

<xsl:apply-templates />

</span>

</xsl:for-each>

<br />

</xsl:for-each>

</xsl:for-each>

</xsl:for-each>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

Now, all you need to do is go to Appearance and set a title for the web part… “You had me at EHLO!” for example. Now, you’re done – hit OK and you’ll go back to the main page; you should see the list of current posts and the date/time the post occurred. One thing which might catch you out is the fact that the WSS server may be behind a proxy – if so, you might see a timeout error on the XML Web Part. You may need to either install the Microsoft Firewall client or else edit the Web.config settings to tell the server which proxy to use – more details are in Q823375.

Ewan Dalton

Published Mar 25, 2004
Version 1.0
  • Had a chat with a client from my previous company about the possibility of displaying rss feeds on their portal.

    Here's two quick options to get aggregated content available to your portal users :

    Tim Heuer's RSS FeedReader 2.0 web part. (It's under stuff) His blog is a very cool resource for Sharepoint stuff as well.
    Using the XML web part that ships with Windows Sharepoint Services. For steps on settings this up go to The Exchange Team blog. There's a quick bit of xsl there you can use
  • Nice tool!

    How would I add other sites? Where do I find Tim H's blog?

    TIA.

    Gary D
  • Just change the blogs.msdn.com/exchange/rss.aspx to the RSS feed URL for the other site.

    For TimH, click on the "Impersonation Failure" link above.