All posts tagged Branding

Adding a View More Link to Web Parts

When we’re designing or mocking up a SharePoint Intranet, Extranet or Internet we always talk about content roll up. SharePoint does a great job with content roll up OOTB (within the same Site Collection at least) using the Content Query Web Part. However, any time you show the client the power of the Content Query Web Part a typical question usually follows…

I love how I can see the top 5 most recent documents… but where is the link to “view more”? How do I get to the rest of the documents?

Like anything else with SharePoint it’s the 80-90% that’s easy and the little questions like this that cause the grief. Now, you could modify the Content Query Web Part styles but that’s not very manageable. Or you could drop a Content Editor Web Part on the page but that seems like a lot of work for one link. Heck, with SharePoint 2010 you could even use an inline Web Part in your main content area and just include the link yourself.

Isn’t there an easier way?

What if you wanted something that looks like this:
Let’s keep this simple, make it flexible and allow you to use this technique on any Web Part, OOTB or custom. Continue reading →

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 →