Intranoggin

Blither, Blather, Web Content Management.
Blog » Content Query Web Part XSL Tip

Content Query Web Part XSL Tip

Today I thought I'd finally get around to posting this XSL tip for working with the content query web part.

Way back, when I started working with this web part, I found this blog entry from Mark Arend, that came in very handy for content query web part customization:  http://blogs.msdn.com/markarend/archive/2007/11/08/xsl-tips.aspx

I've since modified the xsl template slightly so that values are displayed next to the variable names. I use this xsl every time I start a new content query web part configuration.

<xsl:template name="FieldIdentifier" match="Row[@Style='FieldIdentifier']" mode="itemstyle">

        <table>

            <tr>

                <td>--------------------</td>

            </tr>

            <xsl:for-each select="@*">

                <tr>

                    <td>

                 <xsl:value-of select="name()" /> - <xsl:value-of select="." />

             </td>

                </tr>

            </xsl:for-each>

        </table>

    </xsl:template>


Posted: 2/2/2009 8:46:00 AM by Ryan Miller | with 0 comments
Filed under: SharePoint