Skip to main content

Environment Variables

Analog to comet rendering configurators have access to the following context variables. We call them 'environment variables' to be consistent with their use in renderpdf and comet scenarios.

NameValue
GRID_AGENTThe agent name
GRID_DOCUMENT_TEMPLATEThe document template name
GRID_FANOUT_INDEXThe fanout index number (0 if not in a fanout)
GRID_FOREIGN_KEYThe value of the foreign key as sent with the original API call
GRID_LOCAL_URLThe local URL to the rendercss/resources folder of the project
GRID_PROFILESComma delimited list of profiles as sent with the original API call
GRID_PROJECTThe project name
GRID_PROXY_URLThe media proxy URL. Prefer the use of the proxyUrl() function.
GRID_TENANTThe tenant name
GRID_TICKETThe job ticket id
GRIDCUSTOM<name>Custom arguments as sent with the original API call as a list of custom query paramaters. The name part is case sensitive.

Handlebars

To use environment variables in Handlebars, use the env helper function.

Example: (getting the ticket id from the call environment)

The priint cloud job is {{env 'GRID_TICKET'}}.

XSLT

In XSLT the environment variables are exposed as global XSLT parameters.

Example: (getting the ticket id from the call environment)

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="GRID_TICKET"/>
<xsl:template name="hello">
The priint cloud job is <xsl:value-of select="$GRID_TICKET"/>.
</xsl:template>
</xsl:stylesheet>