Extending a supertag
A supertag can extend another supertag. The one that extends is the subtype, and it inherits what its parent gives: fields, defaults, child templates, checkbox settings and automations. A note with the subtype is also a note of every parent.
- Add a parent
- Supertag page ▸ Extends ▸ Add parent supertag
- Remove a parent
- Click the × on the parent’s chip in the Extends row
- Where it shows
- Field rows say Inherited, and Field Settings says Edit on #Parent
- Markdown copy
- Extends links in the supertag’s settings list, and the parents in its Tag definition record
Make one supertag extend another
On the subtype’s page, the Extends row lists its parents as chips. Choose Add parent supertag and pick a supertag, or type a new name and choose Create #Name to make a new supertag that the page then extends. A confirmation titled Extend #Parent? appears.
The confirmation says which fields the notes gain and which they stop getting, and what changes for any field two parents disagree on. It ends with “Affects N notes; existing values stay.” Apply makes the change, and Undo reverses it. Removing a parent works the same way, with the title Stop extending #Parent?.
The picker leaves out the supertag itself and its current parents. Superliner also refuses a parent that would form a loop, such as one of the supertag’s own subtypes.
What a subtype inherits
- Fields: every field of each parent, with its Required setting, its placement, its default and its starting value.
- Child templates: the templates of each parent are copied under a new note too.
- Automations and command buttons: the rules of each parent run on notes with the subtype, and its command buttons appear on them.
- Checkbox settings: a parent’s Show as checkbox, checkbox mapping and default child supertag apply to the subtype. The Behavior section says where a setting comes from.
A subtype can override an inherited field. Give the field a setting of its own on the subtype (Required, placement, a default) and that setting wins for its notes. The field then shows as the subtype’s own field.
Two parents that disagree
Two parents that are not related to each other can bind the same field. The field merges, taking Required and placement from either parent, unless the two give it different starting values. If they do, the field is left out of the subtype, and the note’s card says so: “#Alpha and #Beta give “Size” different initial values. Add it to #Task to choose one.”
Add the field to the subtype to choose. From the Use existing field… form, the line reads “Overrides #Alpha and #Beta, which give it different initial values.” The subtype then keeps their Required and placement, and starts with no initial value until you set one.
Which notes count
A supertag’s page lists the notes that carry it and the notes that carry a subtype. Direct only, a tick on the notes list, narrows it to the notes with the supertag itself. A Note field limited to a supertag accepts a note with any subtype of it.
The browser counts a supertag’s notes the same way. A row’s Extends line names the parents.
Combine it
- A parent with fields for every kindA Work item parent with Client and Due fields gives Task, Bug and Meeting the same two fields, each set once in one place.
- Templates from a parentA parent’s child templates are copied under each new note of a subtype, so every kind of work item starts with its checklist.
- Parents in a project boardA #project can extend a parent that holds the fields every project shares.
- A search across a parentA Supertag condition set to “is” also finds the notes of a subtype. “is exactly” finds only the notes with the supertag itself.
Limits
- A supertag cannot extend itself or form a loop with its subtypes.
- A change to the parents shows its effect before it is made, and existing values stay where they are.
- A parent in Trash gives nothing to its subtypes until it is restored.