Skip to content

Presentation Template

Description

A Presentation Template defines how the data captured by the ANY Set of Form Template or system dynamic data is to be displayed.

Multiple Presentation Templates will exist, and will be associated with multiple document types. There is no strict 1:1 relationship between any document, its template and a presentation template.

The presentation templates are context sensitive, and each template defines the sources of published document information they require.

Presentation Templates can reference any data contained in the referenced Documents, as well as any documents linked by:

The presentation of the payload of all data when not capturing or displaying a Form via its Form Template is controlled by one or more Presentation Template documents.

Presentation TemplatePresentation Template Document    Relationshipscluster_system_parametersSystem ParametersBrand Parameters                             Brand Parameters                        Campaign Parameters                             Campaign Parameters                        Category Parameters                             Category Parameters                        Presentation Template                         Presentation Template                    content typeapplication/schema+jsontypecb99b9bd-681a-49d8-9836-89107c02e8efidDocument IdverDocument VerparametersBrand ParametersCampaign ParametersCategory ParametersPresentation Template:e->Brand Parameters1*

Validation

This specification outlines the required definitions for the current features. The document will be incrementally improved in future iterations as more functionality and features are added. This section will be included and updated in future iterations.

Business Logic

Front End

This specification outlines the required definitions for the current features. The document will be incrementally improved in future iterations as more functionality and features are added. This section will be included and updated in future iterations.

Back End

This specification outlines the required definitions for the current features. The document will be incrementally improved in future iterations as more functionality and features are added. This section will be included and updated in future iterations.

COSE Header Parameters

Metadata

type

Parameter Value
Required yes
Format Document Type
Type cb99b9bd-681a-49d8-9836-89107c02e8ef

The document TYPE.

type Validation

MUST be a known document type.

id

Parameter Value
Required yes
Format Document Id

Document ID, created the first time the document is created. This must be a properly created UUIDv7 which contains the timestamp of when the document was created.

id Validation

IF ver does not == id then a document with id and ver being equal MUST exist.

ver

Parameter Value
Required yes
Format Document Ver

The unique version of the document. The first version of the document must set ver == id

ver represents new versions of the same document as it changes over time.

ver Validation

The document version must always be >= the document ID.

parameters

Parameter Value
Required yes
Format Document Reference
Valid References Brand Parameters
Campaign Parameters
Category Parameters

A reference to the Parameters Document this document lies under.

parameters Validation

In addition to the validation performed for Document Reference type fields:

  • Any linked referenced document that includes a parameters metadata must match the parameters of the referencing document, or a parent of those parameters.

For example, a linked reference to Contest Parameters is transitively a reference to the Parameters document it references, and each parameters document they reference until the Brand parameters document is reached.

The use case here is for Templates. The profile template, or proposal templates could be defined at any of these levels, and as long as they all refer to the same chain of parameters in the hierarchy they are all valid.

Payload

The Presentation Template is defined by its schema. See [presentation_templates.md](TODO)

Schema

Schema: Payload JSON Schema

The Presentation Template is defined by its schema. See [presentation_templates.md](TODO)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "maintainers": [
    {
      "name": "Catalyst Team",
      "url": "https://projectcatalyst.io/"
    }
  ],
  "title": "Presentation Template",
  "description": "Presentation Templates define how data extracted from Form Data is to be presented.\nThey provide a way to parameterize the contents of a UI in response to the changing\nneeds of the Forms themselves.",
  "$defs": {
    "cardDescription": {
      "description": "A long form description of the purpose of the card. Not used by the UI.",
      "type": "string"
    },
    "cardName": {
      "description": "A Card has to have one of the well known defined names.\nThese are the primary identifier which is used by the UI to determine\nwhere the UI will place the card.",
      "enum": [
        "draft-proposal-summary",
        "proposal-contest-summary"
      ],
      "type": "string"
    },
    "cardTitle": {
      "description": "A title shown to the editor of the card.  Not used by the UI.",
      "type": "string"
    },
    "css": {
      "contentType": "text/css; charset=utf-8; template=handlebars",
      "description": "Optional styling that can be used by the HTML generated from the template for presentation.",
      "type": "string"
    },
    "layoutParameters": {
      "description": "Parameters which help the front end layout the provided template. To be defined.",
      "type": "object"
    },
    "requiredDocumentTypes": {
      "description": "A list of the document types (UUIDs) the presentation template needs.",
      "items": {
        "format": "uuid",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "template": {
      "contentType": "text/html; charset=utf-8; template=handlebars",
      "description": "HTML5 defined presentation layout for the card.\nThe data is templated with handlebars, and the data that can be inserted is\nderived from the `requiredDocumentTypes` and available system wide dynamic data.",
      "type": "string"
    }
  },
  "type": "object",
  "properties": {
    "css": {
      "$ref": "#/$defs/cardTemplateCss"
    },
    "description": {
      "$ref": "#/$defs/cardDescription"
    },
    "layout": {
      "$ref": "#/$defs/layoutParameters"
    },
    "name": {
      "$ref": "#/$defs/cardName"
    },
    "requiredDocs": {
      "$ref": "#/$defs/requiredDocumentTypes"
    },
    "template": {
      "$ref": "#/$defs/cardTemplate"
    },
    "title": {
      "$ref": "#/$defs/cardTitle"
    }
  },
  "additionalProperties": false,
  "required": [
    "cardName",
    "requiredDocuments",
    "layoutParameters",
    "template"
  ]
}

Signers

The following Admin roles may sign documents of this type:

  • Brand Admin
  • Campaign Admin

New versions of this document may be published by:

  • author
Copyright © 2024-2025 IOG Singapore, All Rights Reserved
License This document is licensed under CC-BY-4.0
Created 2024-12-27
Modified 2025-07-30
Authors Alex Pozhylenkov alex.pozhylenkov@iohk.io
Nathan Bogale nathan.bogale@iohk.io
Neil McAuliffe neil.mcauliffe@iohk.io
Steven Johnson steven.johnson@iohk.io

Changelog

0.0.4 (2025-05-05)

  • First Version.

0.1.0 (2025-07-30)

  • Updated to match Presentation Schema Definitions.