Template Types
Velocity Templates — Server-side templating language for dynamic configuration and data transformation with access to Polarion services Top Panel Template — Customize the HTML panel above the RISKSHEET grid to display document metadata, custom fields, and navigation controls PDF Export Template — Generate customizable PDF exports with data filtering, page breaks, styling, and multi-page image support Custom Renderer Templates — Create client-side JavaScript renderers for specialized cell displays, custom data formats, and interactive grid cellsTemplate Execution Architecture
When to Use Each Template Type
| Use Case | Template Type | Execution | Output |
|---|---|---|---|
| Display document metadata in header | Top Panel | Server (Velocity) | HTML |
| Generate PDF export with custom layout | PDF Export | Server (Velocity) | |
| Render specialized cell data format | Custom Renderer | Client (JavaScript) | HTML/SVG |
| Dynamic configuration from external files | Velocity | Server (Velocity) | JSON/Config |
| Interactive grid cell with buttons | Custom Renderer | Client (JavaScript) | Interactive HTML |
Template Context and Access
All template types have access to:- Document context: Custom fields, metadata, revision information
- Work item data: Links, properties, related items (in appropriate contexts)
- Configuration: Columns, enums, ratings, data type definitions
- Services: Polarion APIs for querying work items, repositories, and permissions
- Utilities: JSON parsing, HTML escaping, date formatting
Quick Links
- Configure Top Panel — Add custom fields and controls to document header
- Customize PDF Export — Generate branded PDF reports
- Create Custom Renderers — Build specialized grid displays
- Template Path Configuration — Organize templates across projects
Key Constraints
Templates use Apache Velocity syntax with support for directives (
#if, #foreach, #set), references ($variable), and escape tools. Silent references ($!variable) suppress null value output.Sources
Sources
KB ArticlesSource Code
DocumentConfigProvider.javaRisksheetSetupService.javaAppConfig.tsAppConfigParser.tsRisksheetProduct.java