ContentQuery Web Part xsl script to view all available values

May 26, 2009   12:58


ContentQuery xsl script to view all available valuesI’m often using the following xsl template script to check the available values and items which are available for the Content Query Web Part.

This script can be added to the itemstyle.xsl for use. I’m always copying it from older projects, so now it’s on my blog for faster access :)

<xsl:template name=”TestView” match=”Row[@Style='TestView']” mode=”itemstyle”>
 <xsl:for-each select=”@*”>
  ITEM:
  <xsl:value-of select=”name()” />
  VALUE:
  <xsl:value-of select=”.” />
  <BR />
 </xsl:for-each>
 <BR />
 <BR />
</xsl:template>


Tags: , .





Create a multi column layout with the content query tool web part

September 17, 2007   17:55


In your Office Sharepoint Server 2007 site you can display a dynamic view of content on a page by using the Content Query Web Part. This post from Tyler Butler and this one from Heather Solomon helped me on my way.

With the help of these blogs it is not very hard to create a single column presentation of your content. Every single item gets processed by the ItemStyle.xsl found in the Style library / XSL Style sheets section. But if you would like to order your content dynamically in 2 columns you will need to build some extra coding in the ItemStyle.xsl and in the ContentQueryMain.xsl, which is also found in the XSL Style sheets section.

The default templates present our data in a single column:
Single column Content Query Webpart

But for some sites we might want to show our data inside 2 columns:
2 Column Content Query Webpart

(more…)

Tags: , , , , , .









The content expressed in this blog are those of Edwin Vriethoff and do not represent his employer's view in anyway. The contents of this blog has been carefully put together, but Edwin Vriethoff is not responsible in any way for any direct or indirect harm caused by individuals or organizations using the content of this blog in any way.