When to Use Custom Link Rendering
Use thetypeProperties.itemTemplate configuration when you need to:
- Display additional properties alongside the linked item (e.g., severity rating with an effect link)
- Format multi-item link columns with custom HTML structure
- Show linked item descriptions or other fields inline with the link
- Create custom visual layouts for linked items that standard sub-columns cannot achieve
Configure Custom Item Templates
Add theitemTemplate property to your column’s typeProperties section. The template uses Velocity syntax to access linked item fields:
Understanding the Template Syntax
TheitemTemplate uses Velocity script to render linked item content:
Key Template Elements
$item— The current linked work item.fields()— Access to all Polarion fields.get("fieldId")— Access specific custom field by ID.render()— Converts field value to displayable format.htmlFor().forFrame()— Renders as HTML suitable for RISKSHEET display.withIcon(false)— Suppress field type icons
Common Template Patterns
Display Item ID and Title
Show Description with Severity Badge
Multi-Column Layout with Table Cells
Styling Custom Templates
Use inline CSS within the template for custom styling:display: table-cell— Create side-by-side layoutwhite-space: nowrap— Prevent text wrappingpadding-right: 4px— Add spacing between elementscolor: #666— Apply text colorfont-size: 0.9em— Adjust text size
Alternative: Server Render for Sub-Columns
If you need to display linked item properties in separate columns rather than inline with the link, useserverRender instead:
serverRender guidance.
Verification
After configuring custom link rendering:- Save your
risksheet.jsonconfiguration - Refresh the RISKSHEET widget
- You should now see linked items displayed with your custom format, showing additional properties alongside the link text
- For multiItemLink columns, each linked item should display with the custom template applied
See Also
- Show Multiple Linked Items — Configure multiItemLink columns
- Render Custom Data — Use serverRender for complex data display
- Display Sub-Columns — Show linked item properties in separate columns
- Configure Upstream Traceability Columns — Set up upstream item links
- Configure Downstream Traceability Columns — Set up downstream task links
- Velocity Templates — Complete Velocity syntax reference
- Cell Decorators — Apply custom JavaScript rendering
- Multi-Item Link Columns — Column type reference
Sources
Sources
KB Articles
- Customize the way Item Links are rendered
- Display Sub-columns for multiItemLink columns
- Collect multiple link columns into one column
- Render column with custom data
CellPreviewFormatter.tsExportToExcel.tsMultiItemLinkEditor.tsRiskSheetContextMenu.tsExportToPdf.ts