Archive for November, 2010

Cleaning up Multi Choice fields in Content Query Web Part

I recently had to put together a Content Query Web Part that displayed a multiple choice field. By default the multiple choice field displays delimited with “;#”. Additionally sometimes you will find this combination of characters on the beginning and the ending of the string. Here is my XSLT template to clean up the choice field and substitute your replacement characters. Additionally I split out some of the supporting templates as they are very useful on their own.

Usage

<xsl:variable name="CleanFieldValue">
     <xsl:call -template name="cleanMultiChoice">
          <xsl:with -param name="choiceValue" select="@FieldValue"></xsl:with>
     </xsl:call>
</xsl:variable>
 
<xsl:call -template name="replaceCharsInString">
     <xsl:with -param name="stringIn" select="$CleanFieldValue"></xsl:with>
     <xsl:with -param name="charsIn" select="';#'"></xsl:with>
     <xsl:with -param name="charsOut" select="', '"></xsl:with>
</xsl:call>

Continue reading →

Adding Links to Central Administration

This is part 1 of a series regarding my recent CodePlex addition SharePoint 2010 Site Styles. I’ve decided to blog on 4 of the concepts that I used in creating the add-on. These are topics that have been blogged about before but hopefully relating to a real working code base will provide some additional value.

The goal is to get some new links to appear within Central Administration. The finished product looks like this:
Continue reading →