feat(docs): clarify attribute prefixes

This commit is contained in:
Elian Doran
2025-04-07 12:35:52 +03:00
parent ec5025d7fd
commit 5130089b34
6 changed files with 66 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
# Attribute Inheritance
Inheritance refers to the process of having a [label](Labels.md) or a [relation](Relations.md) shared across multiple notes, generally in parent-child relations (or anywhere if using templates).
## 1\. Standard Inheritance
## Standard Inheritance
In Trilium, attributes can be automatically inherited by child notes if they have the `isInheritable` flag set to `true`. This means the attribute (a key-value pair) is applied to the note and all its descendants.
@@ -9,7 +9,7 @@ To make an attribute inheritable, simply use the visual editor for <a class="re
As an example, the `archived` label can be set to be inheritable, allowing you to hide a whole subtree of notes from searches and other dialogs by applying this label at the top level.
## 2\. Copying Inheritance
## Copying Inheritance
Copying inheritance differs from standard inheritance by using a `child:` prefix in the attribute name. This prefix causes new child notes to automatically receive specific attributes from the parent note. These attributes are independent of the parent and will persist even if the note is moved elsewhere.
@@ -22,6 +22,6 @@ Copying inheritance differs from standard inheritance by using a `child:` prefix
If a parent note has the label `#child:exampleAttribute`, all newly created child notes will inherit the `#exampleAttribute` label. This can be useful for setting default properties for notes in a specific section.
## 3\. Template Inheritance
## Template Inheritance
Attributes can also be inherited from [templates](../Templates.md). When a new note is created using a template, it inherits the attributes defined in that template. This is particularly useful for maintaining consistency across notes that follow a similar structure or function.