CQWP: 30 Tips #4

In the last tip, I told you that CQWP would populate several fields for you and I gave you an item template that would spit them out for you.  What I left out is that CQWP also populates a number of variables for you (variables are referenced with a $ instead of the @).  These variables are handed into your .xsl as parameters, not through the .xml.  Consequently, there is no easy itemstyle that will just enumerate them all.  Instead, you can see them all defined as parameters in the ContentQueryMain.xsl .

<xsl:param name=”cbq_isgrouping” />
    <xsl:param name=”cbq_columnwidth” />
    <xsl:param name=”Group” />
    <xsl:param name=”GroupType” />
    <xsl:param name=”cbq_iseditmode” />
    <xsl:param name=”cbq_viewemptytext” />
    <xsl:param name=”cbq_errortext” />
    <xsl:param name=”SiteId” />
    <xsl:param name=”WebUrl” />
    <xsl:param name=”PageId” />
    <xsl:param name=”WebPartId” />
    <xsl:param name=”FeedPageUrl” />
    <xsl:param name=”FeedEnabled” />
    <xsl:param name=”SiteUrl” />
    <xsl:param name=”BlankTitle” />
    <xsl:param name=”BlankGroup” />
    <xsl:param name=”UseCopyUtil” />
    <xsl:param name=”DataColumnTypes” />
    <xsl:param name=”ClientId” />
    <xsl:param name=”Source” />
    <xsl:param name=”RootSiteRef” />
    <xsl:param name=”CBQPageUrl” />
    <xsl:param name=”CBQPageUrlQueryStringForFilters” />
  <xsl:variable name=”BeginList” select=”string(‘&lt;ul class=&quot;dfwp-list&quot;&gt;’)” />
  <xsl:variable name=”EndList” select=”string(‘&lt;/ul&gt;’)” />
  <xsl:variable name=”BeginListItem” select=”string(‘&lt;li class=&quot;dfwp-item&quot;&gt;’)” />
  <xsl:variable name=”EndListItem” select=”string(‘&lt;/li&gt;’)” />

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • RSS
  • Google Buzz
  • Tumblr

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>