docs(user): improve documentation on promoted attributes
40
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
generated
vendored
@@ -5,14 +5,14 @@
|
||||
<p>In Trilium, attributes are key-value pairs assigned to notes, providing
|
||||
additional metadata or functionality. There are two primary types of attributes:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<li data-list-item-id="ef9c097e5af906754a4056ace4d16dbee">
|
||||
<p><a class="reference-link" href="#root/_help_HI6GBBIduIgv">Labels</a> can
|
||||
be used for a variety of purposes, such as storing metadata or configuring
|
||||
the behavior of notes. Labels are also searchable, enhancing note retrieval.</p>
|
||||
<p>For more information, including predefined labels, see <a class="reference-link"
|
||||
href="#root/_help_HI6GBBIduIgv">Labels</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<li data-list-item-id="e8416f6f5188a4d8a25917c610a1482c0">
|
||||
<p><a class="reference-link" href="#root/_help_Cq5X6iKQop6R">Relations</a> define
|
||||
connections between notes, similar to links. These can be used for metadata
|
||||
and scripting purposes.</p>
|
||||
@@ -23,6 +23,30 @@
|
||||
</ol>
|
||||
<p>These attributes play a crucial role in organizing, categorizing, and
|
||||
enhancing the functionality of notes.</p>
|
||||
<h2>Types of attributes</h2>
|
||||
<p>Conceptually there are two types of attributes (applying to both labels
|
||||
and relations):</p>
|
||||
<ol>
|
||||
<li data-list-item-id="e778cee42c209e30e41f7d2c99895495d"><strong>System attributes</strong>
|
||||
<br>As the name suggest, these attributes have a special meaning since they
|
||||
are interpreted by Trilium. For example the <code>color</code> attribute
|
||||
will change the color of the note as displayed in the <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a> and
|
||||
links, and <code>iconClass</code> will change the icon of a note.
|
||||
<br> </li>
|
||||
<li data-list-item-id="e0ca0ab889b471e7c18e3d4f6ae6a61e0"><strong>User-defined attributes</strong>
|
||||
<br>These are free-form labels or relations that can be used by the user.
|
||||
They can be used purely for categorization purposes (especially if combined
|
||||
with <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_eIg8jdvaoNNd">Search</a>),
|
||||
or they can be given meaning through the use of <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/_help_CdNpE2pqjmI6">Scripting</a>.</li>
|
||||
</ol>
|
||||
<p>In practice, Trilium makes no direct distinction of whether an attribute
|
||||
is a system one or a user-defined one. A label or relation is considered
|
||||
a system attribute if it matches one of the built-in names (e.g. like the
|
||||
aforementioned <code>iconClass</code>). Keep this in mind when creating
|
||||
<a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> in
|
||||
order not to accidentally alter a system attribute (unless intended).</p>
|
||||
<h2>Viewing the list of attributes</h2>
|
||||
<p>Both the labels and relations for the current note are displayed in the <em>Owned Attributes</em> section
|
||||
of the <a class="reference-link" href="#root/_help_BlN9DFI679QC">Ribbon</a>,
|
||||
@@ -31,13 +55,15 @@
|
||||
only be viewed.</p>
|
||||
<p>In the list of attributes, labels are prefixed with the <code>#</code> character
|
||||
whereas relations are prefixed with the <code>~</code> character.</p>
|
||||
<h2>Attribute Definitions and Promoted Attributes</h2>
|
||||
<p><a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> create
|
||||
a form-like editing experience for attributes, which makes it easy to enhancing
|
||||
the organization and management of attributes</p>
|
||||
<h2>Multiplicity</h2>
|
||||
<p>Attributes in Trilium can be "multi-valued", meaning multiple attributes
|
||||
with the same name can co-exist.</p>
|
||||
<h2>Attribute Definitions and Promoted Attributes</h2>
|
||||
<p>Special labels create "label/attribute" definitions, enhancing the organization
|
||||
and management of attributes. For more details, see <a class="reference-link"
|
||||
href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>.</p>
|
||||
with the same name can co-exist. This can be combined with <a class="reference-link"
|
||||
href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> to
|
||||
easily add them.</p>
|
||||
<h2>Attribute Inheritance</h2>
|
||||
<p>Trilium supports attribute inheritance, allowing child notes to inherit
|
||||
attributes from their parents. For more information, see <a class="reference-link"
|
||||
|
||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/1_Promoted Attributes_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/2_Promoted Attributes_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/3_Promoted Attributes_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -1,31 +1,118 @@
|
||||
<figure class="image image_resized" style="width:61.4%;">
|
||||
<img style="aspect-ratio:938/368;" src="Promoted Attributes_image.png"
|
||||
width="938" height="368">
|
||||
</figure>
|
||||
<p>Promoted attributes are <a href="#root/_help_zEY4DaJG4YT5">attributes</a> which
|
||||
are considered important and thus are "promoted" onto the main note UI.
|
||||
See example below:</p>
|
||||
<p>
|
||||
<img src="Promoted Attributes_promot.png">
|
||||
</p>
|
||||
<p>You can see the note having kind of form with several fields. Each of
|
||||
these is just regular attribute, the only difference is that they appear
|
||||
on the note itself.</p>
|
||||
are displayed prominently in the UI which allow them to be easily viewed
|
||||
and edited.</p>
|
||||
<p>One way of seeing promoted attributes is as a kind of form with several
|
||||
fields. Each field is just regular attribute, the only difference is that
|
||||
they appear on the note itself.</p>
|
||||
<p>Attributes can be pretty useful since they allow for querying and script
|
||||
automation etc. but they are also inconveniently hidden. This allows you
|
||||
to select few of the important ones and push them to the front of the user.</p>
|
||||
<p>Now, how do we make attribute to appear on the UI?</p>
|
||||
<h2>Attribute definition</h2>
|
||||
<p>Attribute is always name-value pair where both name and value are strings.</p>
|
||||
<p><em>Attribute definition</em> specifies how should this value be interpreted
|
||||
- is it just string, or is it a date? Should we allow multiple values or
|
||||
note? And importantly, should we <em>promote</em> the attribute or not?</p>
|
||||
<p>
|
||||
<img src="Promoted Attributes_image.png">
|
||||
</p>
|
||||
<p>You can notice tag attribute definition. These "definition" attributes
|
||||
define how the "value" attributes should behave.</p>
|
||||
<p>In order to have promoted attributes, there needs to be a way to define
|
||||
them.</p>
|
||||
<figure class="image image-style-align-right image_resized" style="width:38.82%;">
|
||||
<img style="aspect-ratio:492/346;" src="1_Promoted Attributes_image.png"
|
||||
width="492" height="346">
|
||||
</figure>
|
||||
<p>Technically, attributes are only name-value pairs where both name and
|
||||
value are strings.</p>
|
||||
<p>The <em>Attribute definition</em> specifies how should this value be interpreted:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e73e2d8dffca4fe59d009bfc5a245da88">Is it just string, or is it a date?</li>
|
||||
<li data-list-item-id="e115a58c2d81149f481c385479cf06965">Should we allow multiple values or note?</li>
|
||||
<li data-list-item-id="eb8cab0b2fdcefb7af9128f63b3b9f4ee">Should we <em>promote</em> the attribute or not?</li>
|
||||
</ul>
|
||||
<h2>Creating a new promoted attribute definition</h2>
|
||||
<p>To create a new promoted attribute:</p>
|
||||
<ol>
|
||||
<li data-list-item-id="e118d34c98d285e3a7492876f73a49ed5">Go to a note.</li>
|
||||
<li data-list-item-id="e480cc90d938f7f728011679df29f6ce0">Go to <em>Owned Attributes</em> in the <a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_BlN9DFI679QC">Ribbon</a>.</li>
|
||||
<li
|
||||
data-list-item-id="e40a26a8a32714572e670d8c7c18d1355">Press the + button.</li>
|
||||
<li data-list-item-id="e5ba4dcc8ae48c7f043de2c8fc5ec1c2c">Select either <em>Add new label definition</em> or <em>Add new relation definition</em>.</li>
|
||||
<li
|
||||
data-list-item-id="e14e894cf6d207a410adbe87c56143799">Select the name which will be name of the label or relation that will
|
||||
be created when the promoted attribute is edited.</li>
|
||||
<li data-list-item-id="e5d803cd5a37a7169a5aa770d769f2dd4">Ensure <em>Promoted</em> is checked in order to display it at the top of
|
||||
notes.</li>
|
||||
<li data-list-item-id="e50c81da6343840b2a06b46a20e21181e">Optionally, choose an <em>Alias</em> which will be displayed next to the
|
||||
promoted attribute instead of the attribute name. Generally it's best to
|
||||
choose a “user-friendly” name since it can contain spaces and other characters
|
||||
which are not supported as attribute names.</li>
|
||||
<li data-list-item-id="e0e08c63296b88ea8ec8ae17104eed366">Check <em>Inheritable</em> to apply it to this note and all its descendants.
|
||||
To keep it only for the current note, un-check it.</li>
|
||||
<li data-list-item-id="ededc09be314b651d919aebd026cc5b86">Press “Save & Close” to apply the changes.</li>
|
||||
</ol>
|
||||
<h2>How attribute definitions actually work</h2>
|
||||
<p>When a new promoted attribute definition is created, it creates a corresponding
|
||||
label prefixed with either <code>label</code> or <code>relation</code>, depending
|
||||
on the definition type:</p><pre><code class="language-text-x-trilium-auto">#label:myColor(inheritable)="promoted,alias=Color,multi,color"</code></pre>
|
||||
<p>The only purpose of the attribute definition is to set up a template.
|
||||
If the attribute was marked as promoted, then it's also displayed to the
|
||||
user for easy editing.</p>
|
||||
<figure class="table" style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:47.64%;">
|
||||
<col style="width:52.36%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:495/157;" src="2_Promoted Attributes_image.png"
|
||||
width="495" height="157">
|
||||
</figure>
|
||||
</td>
|
||||
<td>Notice how the promoted attribute definition only creates a “Due date”
|
||||
box above the text content.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:663/160;" src="3_Promoted Attributes_image.png"
|
||||
width="663" height="160">
|
||||
</figure>
|
||||
</td>
|
||||
<td>Once a value is set by the user, a new label (or relation, depending on
|
||||
the type) is created. The name of the attribute matches one set when creating
|
||||
the promoted attribute.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<p>So there's one attribute for value and one for definition. But notice
|
||||
how definition attribute is <a href="#root/_help_bwZpz2ajCEwO">Inheritable</a>,
|
||||
meaning that it's also applied to all descendant note. So in a way, this
|
||||
definition is used for the whole subtree while "value" attributes are applied
|
||||
only for this note.</p>
|
||||
how an definition attribute can be made <a href="#root/_help_bwZpz2ajCEwO">Inheritable</a>,
|
||||
meaning that it's also applied to all descendant notes. In this case, the
|
||||
definition used for the whole sub-tree while "value" attributes are for
|
||||
each not individually.</p>
|
||||
<h2>Using system attributes</h2>
|
||||
<p>It's possible to create promoted attributes out of system attributes,
|
||||
to be able to easily alter them.</p>
|
||||
<p>Here are a few practical examples:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="eb7e4e362b582d6bf480375d1e5648ac3"><a class="reference-link" href="#root/pOsGYCXsbNQG/_help_GTwFsgaA0lCt">Collections</a> already
|
||||
make use of this practice, for example:
|
||||
<ul>
|
||||
<li data-list-item-id="e0831925d935c7a90f90bd5fed94d089e">Calendars add “Start Date”, “End Date”, “Start Time” and “End Time” as
|
||||
promoted attributes. These map to system attributes such as <code>startDate</code> which
|
||||
are then interpreted by the calendar view.</li>
|
||||
<li data-list-item-id="e4a235f12a7934803ba7706e309511c82"><a class="reference-link" href="#root/pOsGYCXsbNQG/GTwFsgaA0lCt/_help_zP3PMqaG71Ct">Presentation</a> adds
|
||||
a “Background” promoted attribute for each of the slide to easily be able
|
||||
to customize.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e9069ad779c177b7ed0d3ece786e73cd3">The Trilium documentation (which is edited in Trilium) uses a promoted
|
||||
attribute to be able to easily edit the <code>#shareAlias</code> (see
|
||||
<a
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_R9pX4DGra2Vt">Sharing</a>) in order to form clean URLs.</li>
|
||||
<li data-list-item-id="ed14685a7279b42a1769be97ffe7f5e8f">If you always edit a particular system attribute such as <code>#color</code>,
|
||||
simply create a promoted attribute for it to make it easier.</li>
|
||||
</ul>
|
||||
<h3>Inverse relation</h3>
|
||||
<p>Some relations always occur in pairs - my favorite example is on the family.
|
||||
If you have a note representing husband and note representing wife, then
|
||||
@@ -33,7 +120,7 @@
|
||||
This is bidirectional relationship - meaning that if a relation is pointing
|
||||
from husband to wife then there should be always another relation pointing
|
||||
from wife to husband.</p>
|
||||
<p>Another example is with parent - child relationship. Again these always
|
||||
<p>Another example is with parent-child relationship. Again these always
|
||||
occur in pairs, but in this case it's not exact same relation - the one
|
||||
going from parent to child might be called <code>isParentOf</code> and the
|
||||
other one going from child to parent might be called <code>isChildOf</code>.</p>
|
||||
|
||||
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 15 KiB |
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/2_Kanban Board_image.png
generated
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
9
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Geo Map.html
generated
vendored
@@ -1,8 +1,11 @@
|
||||
<aside class="admonition important">
|
||||
<p>Starting with Trilium v0.97.0, the geo map has been converted from a standalone
|
||||
<p><a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_zEY4DaJG4YT5">Attributes</a>
|
||||
<a
|
||||
href="#root/_help_KSZ04uQ2D1St">note type</a>to a type of view for the <a class="reference-link"
|
||||
href="#root/_help_0ESUbbAxVnoK">Note List</a>. </p>
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a><a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_zEY4DaJG4YT5">Attributes</a>Starting
|
||||
with Trilium v0.97.0, the geo map has been converted from a standalone
|
||||
<a
|
||||
href="#root/_help_KSZ04uQ2D1St">note type</a>to a type of view for the <a class="reference-link"
|
||||
href="#root/_help_0ESUbbAxVnoK">Note List</a>. </p>
|
||||
</aside>
|
||||
<figure class="image image-style-align-center">
|
||||
<img style="aspect-ratio:892/675;" src="9_Geo Map_image.png"
|
||||
|
||||
40
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board.html
generated
vendored
@@ -1,5 +1,5 @@
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:918/248;" src="1_Kanban Board_image.png"
|
||||
<img style="aspect-ratio:918/248;" src="2_Kanban Board_image.png"
|
||||
width="918" height="248">
|
||||
</figure>
|
||||
<p>The Board view presents sub-notes in columns for a Kanban-like experience.
|
||||
@@ -101,6 +101,42 @@
|
||||
<li data-list-item-id="eec6f2285fa4d8e95f6a3d40cf51e3d69">To dismiss a rename of a note or a column, press <kbd>Escape</kbd>.</li>
|
||||
</ul>
|
||||
<h2>Configuration</h2>
|
||||
<h3>Displaying custom attributes</h3>
|
||||
<figure class="image image-style-align-center">
|
||||
<img style="aspect-ratio:531/485;" src="Kanban Board_image.png"
|
||||
width="531" height="485">
|
||||
</figure>
|
||||
<p>Note attributes can be displayed on the board to enhance it with custom
|
||||
information such as adding a Due date for your tasks.</p>
|
||||
<p>This feature works exclusively via attribute definitions (<a class="reference-link"
|
||||
href="#root/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a>). The easiest
|
||||
way to add these is:</p>
|
||||
<ol>
|
||||
<li data-list-item-id="eb2220bf769a14b4d3c3763ddb412215a">Go to board note.</li>
|
||||
<li data-list-item-id="ef2b3775a79f59cc97c77a69ca78a345e">In the ribbon select <em>Owned Attributes</em> → plus button → <em>Add new label/relation definition</em>.</li>
|
||||
<li
|
||||
data-list-item-id="e2565a4dfea04fba704b37927e6252ce4">Configure the attribute as desired.</li>
|
||||
<li data-list-item-id="ee18605ea5b4a07f7b3f5529ba00b2a57">Check <em>Inheritable</em> to make it applicable to child notes automatically.</li>
|
||||
</ol>
|
||||
<p>After creating the attribute, click on a note and fill in the promoted
|
||||
attributes which should then reflect inside the board.</p>
|
||||
<p>Of note:</p>
|
||||
<ul>
|
||||
<li data-list-item-id="e5a19ed95dbafe9a850690bea201deba1">Both promoted and non-promoted attribute definitions are supported. The
|
||||
only difference is that non-promoted attributes don't have an “Alias” for
|
||||
assigning a custom name.</li>
|
||||
<li data-list-item-id="e7ec69af7257cfe86e14bb803910872b4">Both “Single value” and “Multi value” attributes are supported. In case
|
||||
of multi-value, a badge is displayed for every instance of the attribute.</li>
|
||||
<li
|
||||
data-list-item-id="e810a5dbe56db7e59f9091e45c545a611">All label types are supported, including dates, booleans and URLs.</li>
|
||||
<li
|
||||
data-list-item-id="e49414fe2d9d206692332cd7d7ff1d4c0">Relation attributes are also supported as well, showing a link with the
|
||||
target note title and icon.</li>
|
||||
<li data-list-item-id="e1c3fb07ae71ca498c04613917eca93d4">Currently, it's not possible to adjust which promoted attributes are displayed,
|
||||
since all promoted attributes will be displayed (except the <code>board:groupBy</code> one).
|
||||
There are plans to improve upon this being able to hide promoted attributes
|
||||
individually.</li>
|
||||
</ul>
|
||||
<h3>Grouping by another label</h3>
|
||||
<p>By default, the label used to group the notes is <code>#status</code>.
|
||||
It is possible to use a different label if needed by defining a label named <code>#board:groupBy</code> with
|
||||
@@ -108,7 +144,7 @@
|
||||
prefix).</p>
|
||||
<h3>Grouping by relations</h3>
|
||||
<figure class="image image-style-align-right">
|
||||
<img style="aspect-ratio:535/245;" src="Kanban Board_image.png"
|
||||
<img style="aspect-ratio:535/245;" src="1_Kanban Board_image.png"
|
||||
width="535" height="245">
|
||||
</figure>
|
||||
<p>A more advanced use-case is grouping by <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_Cq5X6iKQop6R">Relations</a>.</p>
|
||||
|
||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board_image.png
generated
vendored
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 47 KiB |
103
docs/User Guide/!!!meta.json
vendored
@@ -9925,7 +9925,7 @@
|
||||
"dataFileName": "Kanban Board.md",
|
||||
"attachments": [
|
||||
{
|
||||
"attachmentId": "IrIeh59VGjHq",
|
||||
"attachmentId": "3ze7RpkjIWdW",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
@@ -9933,12 +9933,20 @@
|
||||
"dataFileName": "Kanban Board_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "usSSa0WI6dDK",
|
||||
"attachmentId": "IrIeh59VGjHq",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "1_Kanban Board_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "usSSa0WI6dDK",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "2_Kanban Board_image.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -10026,6 +10034,20 @@
|
||||
"value": "geomap",
|
||||
"isInheritable": false,
|
||||
"position": 90
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "zEY4DaJG4YT5",
|
||||
"isInheritable": false,
|
||||
"position": 100
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "OFXdgB2nNk1F",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
@@ -11249,6 +11271,27 @@
|
||||
"value": "bx bx-list-check",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "oPVyFC7WL2Lp",
|
||||
"isInheritable": false,
|
||||
"position": 120
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "eIg8jdvaoNNd",
|
||||
"isInheritable": false,
|
||||
"position": 130
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "CdNpE2pqjmI6",
|
||||
"isInheritable": false,
|
||||
"position": 140
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
@@ -11713,27 +11756,71 @@
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-table",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "BlN9DFI679QC",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "GTwFsgaA0lCt",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "zP3PMqaG71Ct",
|
||||
"isInheritable": false,
|
||||
"position": 70
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "R9pX4DGra2Vt",
|
||||
"isInheritable": false,
|
||||
"position": 80
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Promoted Attributes.md",
|
||||
"attachments": [
|
||||
{
|
||||
"attachmentId": "4EcBRWF9iCk2",
|
||||
"attachmentId": "8ue55DaAJ82K",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/jpg",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "Promoted Attributes_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "Txf5Jdm2vqt2",
|
||||
"title": "promoted-attributes.png",
|
||||
"attachmentId": "bLMPNRtMAaKo",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "Promoted Attributes_promot.png"
|
||||
"dataFileName": "1_Promoted Attributes_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "FbNQB8xcY0Nu",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "2_Promoted Attributes_image.png"
|
||||
},
|
||||
{
|
||||
"attachmentId": "yBIe1DyxuL2e",
|
||||
"title": "image.png",
|
||||
"role": "image",
|
||||
"mime": "image/png",
|
||||
"position": 10,
|
||||
"dataFileName": "3_Promoted Attributes_image.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,19 +12,30 @@ In Trilium, attributes are key-value pairs assigned to notes, providing addition
|
||||
|
||||
These attributes play a crucial role in organizing, categorizing, and enhancing the functionality of notes.
|
||||
|
||||
## Types of attributes
|
||||
|
||||
Conceptually there are two types of attributes (applying to both labels and relations):
|
||||
|
||||
1. **System attributes**
|
||||
As the name suggest, these attributes have a special meaning since they are interpreted by Trilium. For example the `color` attribute will change the color of the note as displayed in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and links, and `iconClass` will change the icon of a note.
|
||||
2. **User-defined attributes**
|
||||
These are free-form labels or relations that can be used by the user. They can be used purely for categorization purposes (especially if combined with <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a>), or they can be given meaning through the use of <a class="reference-link" href="../Scripting.md">Scripting</a>.
|
||||
|
||||
In practice, Trilium makes no direct distinction of whether an attribute is a system one or a user-defined one. A label or relation is considered a system attribute if it matches one of the built-in names (e.g. like the aforementioned `iconClass`). Keep this in mind when creating <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> in order not to accidentally alter a system attribute (unless intended).
|
||||
|
||||
## Viewing the list of attributes
|
||||
|
||||
Both the labels and relations for the current note are displayed in the _Owned Attributes_ section of the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>, where they can be viewed and edited. Inherited attributes are displayed in the _Inherited Attributes_ section of the ribbon, where they can only be viewed.
|
||||
|
||||
In the list of attributes, labels are prefixed with the `#` character whereas relations are prefixed with the `~` character.
|
||||
|
||||
## Multiplicity
|
||||
|
||||
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist.
|
||||
|
||||
## Attribute Definitions and Promoted Attributes
|
||||
|
||||
Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a>.
|
||||
<a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> create a form-like editing experience for attributes, which makes it easy to enhancing the organization and management of attributes
|
||||
|
||||
## Multiplicity
|
||||
|
||||
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist. This can be combined with <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> to easily add them.
|
||||
|
||||
## Attribute Inheritance
|
||||
|
||||
|
||||
BIN
docs/User Guide/User Guide/Advanced Usage/Attributes/1_Promoted Attributes_image.png
vendored
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
docs/User Guide/User Guide/Advanced Usage/Attributes/2_Promoted Attributes_image.png
vendored
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/User Guide/User Guide/Advanced Usage/Attributes/3_Promoted Attributes_image.png
vendored
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -1,31 +1,74 @@
|
||||
# Promoted Attributes
|
||||
Promoted attributes are [attributes](../Attributes.md) which are considered important and thus are "promoted" onto the main note UI. See example below:
|
||||
<figure class="image image_resized" style="width:61.4%;"><img style="aspect-ratio:938/368;" src="Promoted Attributes_image.png" width="938" height="368"></figure>
|
||||
|
||||

|
||||
Promoted attributes are [attributes](../Attributes.md) which are displayed prominently in the UI which allow them to be easily viewed and edited.
|
||||
|
||||
You can see the note having kind of form with several fields. Each of these is just regular attribute, the only difference is that they appear on the note itself.
|
||||
One way of seeing promoted attributes is as a kind of form with several fields. Each field is just regular attribute, the only difference is that they appear on the note itself.
|
||||
|
||||
Attributes can be pretty useful since they allow for querying and script automation etc. but they are also inconveniently hidden. This allows you to select few of the important ones and push them to the front of the user.
|
||||
|
||||
Now, how do we make attribute to appear on the UI?
|
||||
|
||||
## Attribute definition
|
||||
|
||||
Attribute is always name-value pair where both name and value are strings.
|
||||
In order to have promoted attributes, there needs to be a way to define them.
|
||||
|
||||
_Attribute definition_ specifies how should this value be interpreted - is it just string, or is it a date? Should we allow multiple values or note? And importantly, should we _promote_ the attribute or not?
|
||||
<figure class="image image-style-align-right image_resized" style="width:38.82%;"><img style="aspect-ratio:492/346;" src="1_Promoted Attributes_image.png" width="492" height="346"></figure>
|
||||
|
||||

|
||||
Technically, attributes are only name-value pairs where both name and value are strings.
|
||||
|
||||
You can notice tag attribute definition. These "definition" attributes define how the "value" attributes should behave.
|
||||
The _Attribute definition_ specifies how should this value be interpreted:
|
||||
|
||||
So there's one attribute for value and one for definition. But notice how definition attribute is [Inheritable](Attribute%20Inheritance.md), meaning that it's also applied to all descendant note. So in a way, this definition is used for the whole subtree while "value" attributes are applied only for this note.
|
||||
* Is it just string, or is it a date?
|
||||
* Should we allow multiple values or note?
|
||||
* Should we _promote_ the attribute or not?
|
||||
|
||||
## Creating a new promoted attribute definition
|
||||
|
||||
To create a new promoted attribute:
|
||||
|
||||
1. Go to a note.
|
||||
2. Go to _Owned Attributes_ in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.
|
||||
3. Press the + button.
|
||||
4. Select either _Add new label definition_ or _Add new relation definition_.
|
||||
5. Select the name which will be name of the label or relation that will be created when the promoted attribute is edited.
|
||||
6. Ensure _Promoted_ is checked in order to display it at the top of notes.
|
||||
7. Optionally, choose an _Alias_ which will be displayed next to the promoted attribute instead of the attribute name. Generally it's best to choose a “user-friendly” name since it can contain spaces and other characters which are not supported as attribute names.
|
||||
8. Check _Inheritable_ to apply it to this note and all its descendants. To keep it only for the current note, un-check it.
|
||||
9. Press “Save & Close” to apply the changes.
|
||||
|
||||
## How attribute definitions actually work
|
||||
|
||||
When a new promoted attribute definition is created, it creates a corresponding label prefixed with either `label` or `relation`, depending on the definition type:
|
||||
|
||||
```
|
||||
#label:myColor(inheritable)="promoted,alias=Color,multi,color"
|
||||
```
|
||||
|
||||
The only purpose of the attribute definition is to set up a template. If the attribute was marked as promoted, then it's also displayed to the user for easy editing.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| <figure class="image"><img style="aspect-ratio:495/157;" src="2_Promoted Attributes_image.png" width="495" height="157"></figure> | Notice how the promoted attribute definition only creates a “Due date” box above the text content. |
|
||||
| <figure class="image"><img style="aspect-ratio:663/160;" src="3_Promoted Attributes_image.png" width="663" height="160"></figure> | Once a value is set by the user, a new label (or relation, depending on the type) is created. The name of the attribute matches one set when creating the promoted attribute. |
|
||||
|
||||
So there's one attribute for value and one for definition. But notice how an definition attribute can be made [Inheritable](Attribute%20Inheritance.md), meaning that it's also applied to all descendant notes. In this case, the definition used for the whole sub-tree while "value" attributes are for each not individually.
|
||||
|
||||
## Using system attributes
|
||||
|
||||
It's possible to create promoted attributes out of system attributes, to be able to easily alter them.
|
||||
|
||||
Here are a few practical examples:
|
||||
|
||||
* <a class="reference-link" href="../../Collections.md">Collections</a> already make use of this practice, for example:
|
||||
* Calendars add “Start Date”, “End Date”, “Start Time” and “End Time” as promoted attributes. These map to system attributes such as `startDate` which are then interpreted by the calendar view.
|
||||
* <a class="reference-link" href="../../Collections/Presentation.md">Presentation</a> adds a “Background” promoted attribute for each of the slide to easily be able to customize.
|
||||
* The Trilium documentation (which is edited in Trilium) uses a promoted attribute to be able to easily edit the `#shareAlias` (see <a class="reference-link" href="../Sharing.md">Sharing</a>) in order to form clean URLs.
|
||||
* If you always edit a particular system attribute such as `#color`, simply create a promoted attribute for it to make it easier.
|
||||
|
||||
### Inverse relation
|
||||
|
||||
Some relations always occur in pairs - my favorite example is on the family. If you have a note representing husband and note representing wife, then there might be a relation between those two of `isPartnerOf`. This is bidirectional relationship - meaning that if a relation is pointing from husband to wife then there should be always another relation pointing from wife to husband.
|
||||
|
||||
Another example is with parent - child relationship. Again these always occur in pairs, but in this case it's not exact same relation - the one going from parent to child might be called `isParentOf` and the other one going from child to parent might be called `isChildOf`.
|
||||
Another example is with parent-child relationship. Again these always occur in pairs, but in this case it's not exact same relation - the one going from parent to child might be called `isParentOf` and the other one going from child to parent might be called `isChildOf`.
|
||||
|
||||
Relation definition allows you to specify such "inverse relation" - for the relation you just define you specify which is the inverse relation. Note that in the second example we should have two relation definitions - one for `isParentOf` which defines `isChildOf` as inverse relation and then second relation definition for `isChildOf` which defines `isParentOf` as inverse relation.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 15 KiB |
BIN
docs/User Guide/User Guide/Collections/2_Kanban Board_image.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
@@ -1,6 +1,6 @@
|
||||
# Geo Map
|
||||
> [!IMPORTANT]
|
||||
> Starting with Trilium v0.97.0, the geo map has been converted from a standalone [note type](../Note%20Types.md) to a type of view for the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20List.md">Note List</a>.
|
||||
> <a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a><a class="reference-link" href="../Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a><a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a>Starting with Trilium v0.97.0, the geo map has been converted from a standalone [note type](../Note%20Types.md) to a type of view for the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20List.md">Note List</a>.
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:892/675;" src="9_Geo Map_image.png" width="892" height="675"></figure>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Kanban Board
|
||||
<figure class="image"><img style="aspect-ratio:918/248;" src="1_Kanban Board_image.png" width="918" height="248"></figure>
|
||||
<figure class="image"><img style="aspect-ratio:918/248;" src="2_Kanban Board_image.png" width="918" height="248"></figure>
|
||||
|
||||
The Board view presents sub-notes in columns for a Kanban-like experience. Each column represents a possible value for a status label, which can be adjusted.
|
||||
|
||||
@@ -65,13 +65,36 @@ The board view has mild support for keyboard-based navigation:
|
||||
|
||||
## Configuration
|
||||
|
||||
### Displaying custom attributes
|
||||
|
||||
<figure class="image image-style-align-center"><img style="aspect-ratio:531/485;" src="Kanban Board_image.png" width="531" height="485"></figure>
|
||||
|
||||
Note attributes can be displayed on the board to enhance it with custom information such as adding a Due date for your tasks.
|
||||
|
||||
This feature works exclusively via attribute definitions (<a class="reference-link" href="../Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a>). The easiest way to add these is:
|
||||
|
||||
1. Go to board note.
|
||||
2. In the ribbon select _Owned Attributes_ → plus button → _Add new label/relation definition_.
|
||||
3. Configure the attribute as desired.
|
||||
4. Check _Inheritable_ to make it applicable to child notes automatically.
|
||||
|
||||
After creating the attribute, click on a note and fill in the promoted attributes which should then reflect inside the board.
|
||||
|
||||
Of note:
|
||||
|
||||
* Both promoted and non-promoted attribute definitions are supported. The only difference is that non-promoted attributes don't have an “Alias” for assigning a custom name.
|
||||
* Both “Single value” and “Multi value” attributes are supported. In case of multi-value, a badge is displayed for every instance of the attribute.
|
||||
* All label types are supported, including dates, booleans and URLs.
|
||||
* Relation attributes are also supported as well, showing a link with the target note title and icon.
|
||||
* Currently, it's not possible to adjust which promoted attributes are displayed, since all promoted attributes will be displayed (except the `board:groupBy` one). There are plans to improve upon this being able to hide promoted attributes individually.
|
||||
|
||||
### Grouping by another label
|
||||
|
||||
By default, the label used to group the notes is `#status`. It is possible to use a different label if needed by defining a label named `#board:groupBy` with the value being the attribute to use (with or without `#` attribute prefix).
|
||||
|
||||
### Grouping by relations
|
||||
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:535/245;" src="Kanban Board_image.png" width="535" height="245"></figure>
|
||||
<figure class="image image-style-align-right"><img style="aspect-ratio:535/245;" src="1_Kanban Board_image.png" width="535" height="245"></figure>
|
||||
|
||||
A more advanced use-case is grouping by [Relations](../Advanced%20Usage/Attributes/Relations.md).
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 47 KiB |