Tuesday, March 24, 2015

Display Link Lists in the SharePoint 2013 Content Query Web Part

Display Link Lists in the SharePoint 2013 Content Query Web Part

StyleLibrary: Itemstyle. xsl


<xsl:template name="LinkList" match="Row[@Style='LinkList']" mode="itemstyle">
     <xsl:variable name="SafeLinkUrl">
         <xsl:call-template name="OuterTemplate.GetSafeLink">
             <xsl:with-param name="UrlColumnName" select="@URL"/>
         </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="'LinkUrl'"/>
         </xsl:call-template>
     </xsl:variable>
     <xsl:variable name="TheLink">
<xsl:value-of select="substring-before($DisplayTitle,',')"/>
     </xsl:variable>
     <div id="linkitem">
         <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
         <a href="{$TheLink}" target="_blank" title="This link opens in a new window">
         <xsl:value-of select="substring-after($DisplayTitle,',')"/>
         </a>
     </div>
 </xsl:template>

No comments:

Post a Comment