Export templates are stored as a specialised from of Tinderbox note.
A note's availability as a template is stored in attribute $IsTemplate. An easy way to set this is via the document's Properties Inspector Prototype sub-tab has a check-box, Template. If this is checked, $IsTemplate is set to
Template notes appear in selection menus by their complete path. For example, if the template Book Template is a note inside the root-level container named "Templates", it appears in the menu as
/Templates/Book Template
and would be used in code thus:
^include("/Templates/Book Template")^
If a note's name (or path/name) is identical to the name of a template file, the note template will be used rather than the file.
Although a note anywhere in the document can be template (and may be in some long-lived TBXs), currently it is strongly advised to use the default location. As the latter is not created by default (not everyone uses/needs export!) the easiest way to make this is to use File menu → Templates and select any of the built-in templates. This creates the /Templates
folder and other configuration setting (e.g an OnAdd making all new child notes a template, etc. You can always delete the built-in template used to create the container if not wanted.
Note templates can be selected from text pane's HTML tab (only if no template has been initially set) or via the Export Inspector's Export tab.
Template notes (that use the 'HTML' prototype) are configured to use settings like a monospace $TextFont and disabling smart quotes, and more.