I have a custom template that I use for a CQWP with announcements. I have it set to truncate the announcement at 750 characters, then show a link with the text [Full Announcement]. The issue is when an announcement is under 750 characters, it still shows the [Full Announcement] text. This is the code:
<xsl:template name="NewsAnnounStyle" match="Row[@Style='NewsAnnounStyle']" mode="itemstyle">
<table style="width:100%;">
<tr>
<td>
<table style="width:100%;">
<tr style="background-color:#f6f6f6;"><td>
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<h3 style="font-weight:600;"><a href="{$SafeLinkUrl}" style="color:#03478a;"><xsl:value-of select="@MyTitle"/></a></h3>
</td></tr>
<tr><td>
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of disable-output-escaping="yes" select="substring(@MyDesc,1,750)" />
<xsl:if test="string-length(@MyDesc) > 750">
... <a href="{$SafeLinkUrl}">[Full Announcement]</a><br />
</xsl:if>
</td></tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:template>
Any ideas or guidance on how to have the [Full Announcements] only show when the announcement is over the 750 characters?