4.2.6.3 Configure certificate templates
⚠️ Important: Changes to Certificate Configuration in OpenCRVS 1.9
Step 1. Configuring certificate SVG files
# Variables & functions
## Available top-level variables
- `$state`: Event record in it's current state
- `$declaration`: Raw declaration data
- review: used to show that the certificate is in a preview state before printing so you can render a pre-printed watermark, common in official certificate paper stock
## Available top-level functions
### `$lookup`
Used for direct property lookup within objects.
- `$lookup $state "modifiedAt"`
- `$lookup $state "updatedAtLocation"`
- `$lookup $state "createdAtLocation"`
- `$lookup $state "assignedTo"`
- `$lookup $declaration "child.firstname"`
- `$lookup $declaration "child.surname"`
- `$lookup $declaration "child.gender"`
### `$intl`
Looks up i18n translation strings.
- `$intl 'constants' ($lookup $declaration "child.gender")`
- `$intl 'v2.constants.informant' ($lookup 'informant.relation')`
### `$or`
Returns the first non-undefined value among two expressions.
- `$or ($lookup 'child.address.other.district') ($lookup 'child.address.other.district2')`
### `$formatDate`
Formats a date using a given format string.
- `$formatDate ($lookup $state "modifiedAt") "dd MMMM yyyy"`
- `$formatDate ($lookup $state "createdAt") "dd MMMM yyyy"`Event
Certificate template SVG
Step 2: Add custom font files
Step 3: Serve certificates to the application
Last updated