Skip to main content


Showing posts from January, 2009

Modifying SharePoint's ItemStyle.xsl causes problem with Summary Link Web Part

Today I discovered an issue with some customisations I did for a client. The customisations involved changing the ItemStyle.xsl file, to add new templates for a Content Query Web Part. More specifically, the client wanted to show a view of news items, the latest news item to be displayed in full, and the remaining x number of items to display in summary form. This can be done with a test for preceding sibling nodes, e.g. <xsl:test="count(preceding-sibling::*)=0"> This particular client had one more specific requirement, to also show images associated to the latest News Item. To do this, I created a new XSL variable, pulling in the URL of the image with the following code: <xsl:variable name="NewsItemImage"> <xsl:call-template name="OuterTemplate.FormatValueIntoUrl"> <xsl:with-param name="Value" select="@ImageUrl"> </xsl:with-param> </xsl:call-template>