imageUrlΒΆ

This generates a URL pointing to an image. See parameters for portal.imageUrl.

Usage in Thymeleaf:

<img data-th-src="${portal.imageUrl({'_id=11})}"/>
<img data-th-src="${portal.imageUrl({'_name=test})}"/>

Usage in XSLT:

<xsl:stylesheet version="2.0" exclude-result-prefixes="#all"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:portal="urn:enonic:xp:portal:1.0">

  <xsl:template match="/">
    <xsl:value-of select="portal:imageUrl('_id=11')"/>
    <xsl:value-of select="portal:imageUrl('_name=test')"/>
  </xsl:template>

</xsl:stylesheet>