componentUrlΒΆ

This generates a URL pointing to a component. See parameters for portal.componentUrl.

Usage in Thymeleaf:

<a data-th-href="${portal.componentUrl({'_component=main/1'})}">Link</a>

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:componentUrl('_component=main/1')"/>
  </xsl:template>

</xsl:stylesheet>