Templates

Introduction

Canvas templates are special canvases which are designed to allow sharing common logic and layout across your project or workspace.

When a canvas has been marked as a template:

  • That canvas will appear in the templates list

  • It will be possible to pin that canvas to the 'New canvas' group in a project

Templates are very flexible - they can be designed as a starting point for an entire new canvas, or they can be much smaller and contain some commonly-used controls or logic, or even just a single cell with a bunch of common Python functions.

Creating a template

Templates are created from a whole canvas, or a selection of objects. To create a template from the whole canvas:

  • Click the Save as template option from the design bar when no objects are selected.

  • Choose the Save as template option from the File menu.

To create a template from a selection of objects, select the objects and click Save as template from the design bar.

In all cases, the template dialog will appear which allows customising various properties of the template:

  • Template name - this will be the title of the new template canvas that is created.

  • Description - the description of the template.

  • Project / workspace - should this template be available to members of this project, or the whole workspace?

  • Select preview area - choosing this option will allow fine-tuning the area of the template that thumbnails are generated for, in case you'd like to highlight a particular area of the template.

  • Upload image - choose this option to upload a custom thumbnail image for this template.

These properties can also be updated later after the template has been created.

Editing a template

Remember - templates are just canvases! To edit a template, just navigate to it and edit it as you would any other canvas. All of the other canvas rules apply, including realtime multiplayer editing, version control, permissions etc.

There are just a couple of differences to be aware of when editing templates:

  • Alerts cannot be added to a template

  • Changes to templates are not immediately published - only the latest version of a template is used when it is imported in other canvases. To make your changes available to other members of your workspace, click the Update template button to publish those changes. (Note - unpublished changes to a template are saved continuously, as with all canvases.)

Publishing a template is really just saving a new version of the template - check previous versions in the version history.

Creating a canvas from a template

There are several ways to start a new canvas from a template. In all cases, the contents of the latest version of the template will be copied into a new canvas.

  • Right-click the template from the project home page and choose Create canvas from template:

  • If the template has been pinned to the project, choose it from the New canvas list

Inserting a template into a canvas

To insert the contents of a template into an existing canvas, click the Add template button in the corner of the canvas:

The templates dialog will be opened, which allows navigating the custom templates in your workspace, and the built-in templates designed by the team at Count:

To insert the objects from one of these templates, hover over it and click the Use template button. To view an interactive preview of the template, click the Preview button:

When inserting objects from templates:

  • Any shared styles will be copied into your canvas.

  • Any template cells with conflicting names will be renamed.

  • Any images and CSV files will be copied into your canvas.

  • If a template cell refers to a database connection that you do not have access to, it will show an error.

Last updated