📐

template.json

Introduction

A LivePage Template define the look and feel through the index.html file and the related assets in the folder. A template can also specify the Widgets and Blocks to be enabled and configured for the template. This is all done through the template.json file that has this basic structure:

{
  "widgets": {
    // widgets configuration goes here
  },
  "blocks": {
    // blocks configuration goes here
  }
}

Widgets

Widgets can be configured through the . With the template.json configuration file, you are able to specify which type of user should be able to access the widget settings, and which widgets to enable for a LivePage.

image

Specifications

⚙️
JSON Config

KeyTypeDescription
StringArray

Restricts access to specific 🏏User Roles supported in the . Possible values are: 1. "*" - (default value) denotes all 2. JSON object specifying user role and consisting of header or live-bar (eg ["header", "live-bar"]

JSON Object

Specifies the list of widgets that are made available through the . The possible values are: 1. "*" - (default value) Denotes all - ie, visible to everybody. 2. JSON object specifying hide value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

Examples

You may refer to this section for some examples on how you can be creative and restrict certain features for the different user roles.

Blocks

For every LivePage Template, you have the ability to implement restrictions to the features associated with Blocks on the Venue Editor. This can be defined within the "blocks" section of template.json , which has the following structure

"blocks": {
    "preventAdd": false, // Specifies whether blocks can be added to a LivePage
    "enabledBlocks": "*", // Specifies the Blocks that can be added and changed to
    "predefinedBlocks": {
        // Predefined blocks configuration goes here
    }
}

Specifications

⚙️
JSON Config

Key CategoryKeyTypeDescription
predefinedBlocks
JSON Object

JSON representation of a Block as defined at 📦Blocks

blocks
StringArray

Specifies the list of blocks available to be added on a LivePage. The possible values are: 1. "*" - (default value) denotes all 2. Array of Block names to be enabled. Eg: ["RichText", "LiveStream", "Image", "ImageList", "ImageSlideshow", "Pdf", "Resources", "Link"] Full list of 📦Blocks

blocksdefaultLivepages
JSON Object

JSON object listing predefined blocks along with default configuration. Read full specs at predefinedBlocks

blocks
BooleanJSON Object

Determines whether the "Add Block" button shows up in Venue Editor for a LivePage. The possible values are: 1. false - (default value) - ie, everybody can Add new block 2. true - nobody has access to Add new block 3. JSON object specifying value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

predefinedBlocks
BooleanJSON Object

Determines whether a user is able to view and edit the "Block Settings" section (that consists of Width, Bounding Box, Height, etc...) in Venue Editor for a LivePage. The possible values are: 1. false - (default value) - ie, everybody can view and edit the settings 2. true - nobody can view and edit the settings 3. JSON object specifying value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

predefinedBlocks
BooleanJSON Object

Determines whether a user is able to change the type of Block in the Venue Editor for a LivePage. The possible values are: 1. false - (default value) - ie, everybody can change the type 2. true - nobody can change the type 3. JSON object specifying value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

predefinedBlocks
BooleanJSON Object

Determines whether a user is able to delete a block in the Venue Editor for a LivePage. The possible values are: 1. false - (default value) - ie, everybody can delete the block 2. true - nobody can delete the block 3. JSON object specifying value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

predefinedBlocks
BooleanJSON Object

Determines whether a user is able to view and edit the settings of a Block in the Venue Editor for a LivePage. The possible values are: 1. false - (default value) - ie, everybody can view and edit the settings 2. true - nobody can view or edit the settings 3. JSON object specifying value for each user role. Eg: { "SPONSOR": true, "MANAGER": false }

predefinedBlocks
String

Title of Block

predefinedBlocks
String

Refers to "Type Name" as listed in 📦Blocks

Examples

You may refer to this section for some examples on how you can be creative and restrict certain features for the different user roles.