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.
| Name | Value |
|---|---|
| GRID_AGENT | The agent name |
| GRID_DOCUMENT_TEMPLATE | The document template name |
| GRID_FANOUT_INDEX | The fanout index number (0 if not in a fanout) |
| GRID_FOREIGN_KEY | The value of the foreign key as sent with the original API call |
| GRID_LOCAL_URL | The local URL to the rendercss/resources folder of the project |
| GRID_PROFILES | Comma delimited list of profiles as sent with the original API call |
| GRID_PROJECT | The project name |
| GRID_PROXY_URL | The media proxy URL. Prefer the use of the proxyUrl() function. |
| GRID_TENANT | The tenant name |
| GRID_TICKET | The 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>