An extension is a piece of code which runs while the document is being composed. It exists for what the two instructions cannot express: a calculation with a rule behind it, a value fetched from somewhere which is not a database, a check which has to fail the composition rather than print something odd.
An extension is the exception rather than the rule. What a query and a repetition can do is better done there, because it stays visible in the model.
## Properties
- "Code": how the extension is identified.
- "Description" and "Comment": what it does, and why it exists.
- "Code language": the language the definition is written in.
- "Definition": the code itself, where it is held in the model.
- "Location": where the code is held when it is not in the model.
- "Always load from remote location": whether the code is fetched afresh every time instead of using what was loaded before. Fetching afresh means a correction takes effect without the template being redistributed; not fetching means the template keeps working when the location is unreachable.
- "Load order": in which order the extensions are loaded, for the case where one depends on another.
- "Active": whether the extension is used at all. This is what lets an extension be switched off without being deleted, which is the first thing to try when a template misbehaves.