A Tinderbox document has two basic kinds of structure: one is the structure formed by links between notes. The other is the hierarchical structure of the document. A Tinderbox note can contain other notes, which can contain other notes, and so on. The notes can thought of this as chapters containing sections containing divisions; or topics containing sub-topics; or in any way that fits the user's workflow.
Several terms are used to describe relationships within a hierarchy:
- parent: the item one level up. A parent note contains one or more child notes (children), and thus contains one or more levels of sub-notes. A parent note may also be referred to as a 'container' as is contains other notes.
- siblings: items that have the same parent.
- child: an item one level down. In Tinderbox, when a note contains other notes, those notes are its children. A child note is thus any note that has a parent note — i.e. it is not a top level note.
- descendant: a child, or a child of a child, and so on.
- ancestor: a parent, or a parent of a parent, and so on.
- grandparent: specifically the parent of a note's parent.
- root: the item that has no parent. In a Tinderbox document, the document as a whole is the root: it contains the top-level notes, and nothing contains it.
- cover: the top level note. If more than one root-level note, the cover it the oldest sibling.
In the image, notes with names that are designators are in red. Note that designators are case-sensitive when used in export/action code.
There are several group terms to describe Tinderbox notes:
- all: all notes in the current TBX file.
- ancestor: all ancestors.
- children: all children (pre-v5.6.0 this was 'child').
- descendant: all descendants - i.e. all children and their children.
- sibling: all siblings.
Any note containing other notes is a 'container'; put another way, a container is any note that has children/descendants. Agents are a special class of container, holding an alias to every note matching the query stored in their $AgentQuery attribute.