Skip to content

Instantly share code, notes, and snippets.

@DWboutin
Created August 27, 2015 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DWboutin/4c7f4a48f3002862a031 to your computer and use it in GitHub Desktop.
Save DWboutin/4c7f4a48f3002862a031 to your computer and use it in GitHub Desktop.
Get image thumbnail in XSLT
<xsl:variable name="URLimage">
<xsl:value-of select="substring-before(substring-after(@imageEvenement,'src=&#34;'),'&#34;')" />
</xsl:variable>
<xsl:variable name="ImgFilename">
<xsl:value-of select="substring-after($URLimage,'PublishingImages/')" />
</xsl:variable>
<xsl:variable name="URLThumb">
<xsl:value-of select="concat(substring-before($URLimage,$ImgFilename),'_t/',substring-before($ImgFilename,'.'),'_',substring-after($ImgFilename,'.'),'.',substring-after($ImgFilename,'.'))" />
</xsl:variable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment