I have an Announcement Webpart added in my pages I want to add Read more link blow each item I searched the net they give this xsl code blow:

<xsl:template name="removeMarkup">
   <xsl:param name="string" />
   <xsl:when test="contains($string, '&lt;')">
          <xsl:variable name="nextString">
                 <xsl:call-template name="removeMarkup">
                 <xsl:with-param name="string" select="substring-after($string, '&gt;')" />
          <xsl:value-of select="concat(substring-before($string, '&lt;'), $nextString)" />
          <xsl:value-of select="$string" />
<xsl:template name="ReadMoreAnnouncements" match="Row[@Style='ReadMoreAnnouncements']" mode="itemstyle">
<br />
<div class="RMAnnouncementsTitle">
    <xsl:value-of select="@Title" />
 <div class="RMAnnouncementsBody">
    <xsl:variable name="bodyContent">
        <xsl:call-template name="removeMarkup">
            <xsl:with-param name="string" select="@Body"/>
    <xsl:value-of select="substring($bodyContent,1,190)" />
    <br />
        <xsl:attribute name="href">
            <xsl:value-of select="@ID">
        <xsl:attribute name="class">
        read more

I have putted in my ItemStyle.xsl before

but it don't shows read more link. please any help will be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.