serviceUrlΒΆ

This generates a URL pointing to a service.

Parameters:

_service
Name of the service.
_application
Other application to reference to. Default is current application.
_type
URL type. Either server (server-relative URL) or absolute. Default is server.
everything else
Custom parameters to append to the url.

Usage in Thymeleaf:

<a data-th-href="${portal.serviceUrl({'_service=myservice', 'a=3'})}">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:serviceUrl('_service=myservice', 'a=3')"/>
  </xsl:template>

</xsl:stylesheet>