Skip to Content

Template management

This section outlines the core features available within each template on the platform. These tools help you manage, configure, and get the most out of your templates.

Available actions

Default render options

Each template can define a set of default Output formats and Render options that will be used for every render execution of that template. These options are set up in the template details page, and they can be overridden by the options supplied when invoking the render.

If you define project default render options they will be automatically inherited in each newly created template within that project. Template-level default options will override the project-level default options.

The overriding at the render time is done in an all-or-nothing manner per category, meaning that if you provide a specific rendering option category in a render request, all default options from the same category will be ignored.

On the Template details page, click on the Edit under the Default render options section, which will open a settings modal.

API cURL example - Set default options Developer guide

curl -X POST \ -H "Content-Type: application/json" \ -u "[API_KEY]:" \ -d '{ "options": { "captions": { "captionsPosition": "TOP", "captionsStyle": "BASIC_WITH_STROKE_AND_SHADOW", "srtFileUrl": "https://my.cnd.net/srt.srt" }, "projectFiles": { "uploadEnabled": true }, "watermark": { "url": "https://example.com/watermark.png" } }, "outputFormat": { "attachment": false, "attachmentFileName": "my_cool_video", "outputModule": "H_264", "postEncoding": { "type": "none" }, "settingsTemplate": "BEST_SETTINGS" } }' \ https://api.plainlyvideos.com/api/v2/projects/[PROJECT_ID]/templates/[TEMPLATE_ID]/options

Reference parameters

Some of the options support the usage of parameter references as their values. This is useful when you want to have a dynamic option that depends on a render parameter.

To reference a parameter in an option value, you need to use the following syntax:

Syntax
{{parameterName:defaultValue}}

The default value is optional, and if not defined, will resolve the option to null if the given parameter name could not be found in the render parameters. Optionally, you can define an empty string as the default value, by using the following syntax:

Specify empty string as default value
{{parameterName:}}

You can combine multiple parameter references and fixed (static) values in the same option. In this case all the references will be replaced by their values, and the fixed values will remain as they are. Note that if any of the referenced parameters is given without a default value and without a render-time value then the entire result of the option will be null.

Combine parameter references and fixed values
{{name}} - {{season:Winter}} Sale Project - 16x9

There are also built-in placeholders that can be used in the same way as parameters. These are {{templateName}} and {{projectName}}, which will be replaced with the actual template and project names during rendering.

Combine built-in placeholders and parameter references
Video from {{projectName}} - Template: {{templateName}} - {{name}}

The fields that support parameter references are:

  • Video file download name
  • Webhook passthrough
  • Integration passthrough

Read more about the referencing parameters in the Change file name and Passthrough sections.

Reference passthrough values in the default options

It is also possible to reference the webhook or integration passthrough values in the default options. These are available as the integrationPassthrough and webhookPassthrough parameters respectively.

The same rules apply for using these parameters as for the regular render parameters.

Reference integration passthrough, fallback to null if not defined during rendering
{{integrationPassthrough}}
Reference webhook passthrough, fallback to empty string if not defined during rendering
{{webhookPassthrough:}}
Reference webhook passthrough, fallback to 'someDefaultValue' if not defined during rendering
{{webhookPassthrough:someDefaultValue}}

Reference template and project names

You can also reference the template and project names in the default options using the built-in placeholders {{templateName}} and {{projectName}}. These placeholders will be replaced with the actual template and project names during rendering.

Reference template and project names
Video from {{projectName}} - Template: {{templateName}}

Integrations

You can also set up integrations for the template, which will be used when rendering the template. This is done in the same way as setting up integrations for a project.

Integrations card on the Template details page provides you with a quick overview of your integrations setup for the template. You can stop/start, remove, or add integrations directly from the card.

Learn more about Integrations in the integrations section.

Generate CSV example

You can generate a CSV file with the template parameters by clicking the Generate CSV button. This downloads a CSV file with all template and layer parameters so you can get started faster with batch rendering.

Editing templates

To edit a template, navigate to the Template details page and click the Edit template button. This starts the same flow as Creating template, where you can edit the template name, composition, and parametrized layers.

To edit parametrized layers, click the Parametrized layers tab and select the layer you want to edit. This opens the Parametrization window, where you can change the layer name and parametrization options.

FAQ

Can I change the composition used for a template later?

Yes, you can change the composition used for a template later. Just go to the Template details page, click on Edit template, and select a different composition from the dropdown menu.

You will need to re-parametrize the layers in the new composition, as the previous parametrization will be removed. This is because the layers in the new composition may have different names or types, and the parametrization needs to be updated accordingly.