HTML Templates

Overview

<translate url="/lib/translate/v1.0.0/template.mjs"></translate>

Templates

A template is a section of HTML that is hosted on a webserver and is inserted into your page. To use a template, add a template tag with the URL of the HTML that you wish to insert. The following demonstrates using a template.

<translate url="/lib/translate/v1.0.0/layout.mjs"></translate> <source url="/templates/scratch.html"></source>

Inserts

When you use a template, you will often need to create content that is placed within the template. This can be done in one of two ways.

The first way to do this is use an insert tag. This tag specifies the id of the HTML tag that you want to insert into. The content of the insert tag is then inserted into the specified HTML section.

<translate url="/lib/translate/v1.0.0/layout.mjs"></translate> <insert target="target1">hello1</insert>


As an alternative, many custom tags let you specify a target attribute, which specifies the id of the HTML section where you want the custom tag rendered.