The designator parent describes the note containing the note currently in focus. In Tinderbox there is only one parent note per child or set of sibling children.
Testing the 'parent' of an alias
The parent of an alias is the alias' own container (note or agent), not that of its original note. However, in more complex scenarios care needs to be taken to establish which alias/original note the user intends to reference. Where multiple aliases exist whether inside agents or elsewhere, there is scope for ambiguity if the user is not careful with their code. When using parent with aliases there are several useful considerations
- The original designator, as in parent(original), will unambiguously indicate that it is the parent of the alias' original note that is being referenced
- Only in agents, the Link type honouring operators designator can be used to allow agent aliases to refer to their 'parent' rather than the parent of the original note on which the alias is based.
- The $Container attribute is intrinsic to an alias and potentially less ambiguous than $Name(parent) if trying to establish an aliases parentage within code.
See also—notes linking to here: