pageUrlΒΆ

This generates a URL pointing to a page.

Parameters:

_id
Id to the page. If id is set, then path is not used.
_path
Path to the page. Relative paths is resolved using the context page.
_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.pageUrl({'_path=/my/page', '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:pageUrl('_path=/my/page', 'a=3')"/>
  </xsl:template>

</xsl:stylesheet>