Wednesday, November 19, 2003


Source: Jan Tielens' Bloggings

The last few days I toyed a little bit with the DotNetNuke open source portal system. I know this is not SharePoint, but it allows to quickly setup good looking website that can easily be maintained by non-technical people.  Although changing the layout (e.g. colors) of the site, especially the top banner with the menu, is quite hard in the beginning. I had to dive into the code to accomplish what I wanted to do. But once you get to know how the portal is designed, altering just anything is done in a second.

A DotNetNuke site consists of a number or tabs with a number of modules on. There many of these modules, including one that displays and RSS feed. This is intresting because it allows you to provide great dynamic content on your site (e.g. the .NET Weblogs Main Feed), with very little effort. By default the News Module display all the contents of the RSS feed as plain text, so HTML tags become escaped HTML tags, so the feed loses its formatting. This behaviour can be changed quite easy by editing the RSS91.xsl file in the DesktopModulesNews directory. In this XSL file, I've added disable-output-escaping="yes" to the value-of tag of the description.

A second modification I've made is to limit the maximum number of news items displayed. This can come in handy when you don't want to display all the 30 or so items of a news feed, but only the last 5 of them. I've solved this by adjusting a copy of the RSS91.xsl file (e.g. RSS91_5.xsl). A new "if test" node is added, that performs a test for each news item. If the position is smaller or equal to 5, the item is displayed. To use the new RSS91_5.xsl, you have to upload the file (e.g. using the File Manager), and set the News module to use the Internal Style Sheet which you can select from the drow down list.

The following xsl displays the last 5 news items of an RSS News Feed, including the HTML formatting.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:param name="TITLE"/>
<xsl:template match=RSS>
  <!-- Do not show channel image -->
  <xsl:for-each select="channel/item">
 <xsl:if test="position() &lt;= 5">
  <br>

  <strong><a href="{link}" target="_main"><xsl:value-of select="title"/></a></strong><br></br>

  <!-- only display markup for description if it's present -->
  <xsl:value-of select="description" disable-output-escaping="yes"/>

  </br>
  <br></br>
 </xsl:if>
  </xsl:for-each>
</xsl:template>

<xsl:template match="description">
  <br>
    <xsl:value-of select="."/>
  </br>
</xsl:template>

</xsl:stylesheet>

[Jan Tielens' Bloggings]
11:25:23 AM    trackback []     Articulate [] 

Source: The Shifted Librarian

Karen Schneider Is A Convert, Too!.

"By popular demand, this is a short introduction to RSS, employing Bloglines, a free, Web-based RSS aggregator (reader). This is how I got started with RSS--hence, it's a guaranteed no-brainer!...

Still, RSS is a bit baffling at first. Once you step in, though, you'll have an immediate 'ah hah.' These directions were written to get you from baffled to 'ah hah' in less than fifteen minutes." [Free Range Librarian]

[The Shifted Librarian]
10:34:09 AM    trackback []     Articulate []