MOSS Content Query Web part itemstyle.xsl

Posted by nav on Stack Overflow See other posts from Stack Overflow or by nav
Published on 2010-04-22T23:53:34Z Indexed on 2010/04/23 1:13 UTC
Read the original article Hit count: 557

Filed under:
|
|
|

Hi,

I have a Content Query Webpart (CQWP) pulling the URL and title from a NewsLinks list. The CQWP uses the XSLT style LVIS.News.Links defined in ItemStyle.xsl.

I need to sort the title @Title0 field as commented out below because it causes an error.

Does anyone know whats causing this error? - Many Thanks. The XSLT code is below:

<xsl:template name="LVIS.News.Links" match="Row[@Style='LVIS.News.Links']" mode="itemstyle">
     <xsl:param name="CurPos" />
     <xsl:param name="Last" />       

   <xsl:variable name="SafeLinkUrl">
            <xsl:call-template name="OuterTemplate.GetSafeLink">
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@URL"/>
                <xsl:with-param name="UrlColumnName" select="'URL'"/>
            </xsl:call-template>
        </xsl:variable>

        <xsl:variable name="LinkTarget">
            <xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
        </xsl:variable>

        <xsl:variable name="SafeImageUrl">
            <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
                <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
            </xsl:call-template>
        </xsl:variable>

        <xsl:variable name="Header">
  <xsl:if test="$CurPos = 1">
   <![CDATA[<ul class="list_Links">]]>  
  </xsl:if>
  </xsl:variable>

  <xsl:variable name="Footer">
   <xsl:if test="$Last = $CurPos">
    <![CDATA[</ul>]]>   
    </xsl:if>
  </xsl:variable> 

  <xsl:value-of select="$Header" disable-output-escaping="yes" />


  <li> 
   <a>
       <xsl:attribute name="href">
        <xsl:value-of select="substring-before($DisplayTitle,', ')"></xsl:value-of>
       </xsl:attribute>
       <xsl:attribute name="title">
        <xsl:value-of select="@Description"/>
           </xsl:attribute>
        <!--    <xsl:sort select="@Title0"/> -->
       <xsl:value-of select="@Title0">
       </xsl:value-of>
   </a>
  </li>


  <xsl:value-of select="$Footer" disable-output-escaping="yes" />


    </xsl:template> 

© Stack Overflow or respective owner

Related posts about xslt

Related posts about moss