mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
docs: ✏️ Update day note and template docs
This commit is contained in:
parent
6caba39621
commit
f3aa6adb65
@ -55,8 +55,7 @@
|
|||||||
<br>To transition to the new system:</p>
|
<br>To transition to the new system:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Set up the new template pattern in the Calendar root note.</li>
|
<li>Set up the new template pattern in the Calendar root note.</li>
|
||||||
<li>Use <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_ivYnonVFBxbQ">Bulk Actions</a> to
|
<li>Use <a href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a> to remove <code>child:template</code> and <code>child:child:template</code> from
|
||||||
remove <code>child:template</code> and <code>child:child:template</code> from
|
|
||||||
all notes under the Journal (calendar root).</li>
|
all notes under the Journal (calendar root).</li>
|
||||||
<li>Ensure that all old template patterns are fully removed to prevent conflicts
|
<li>Ensure that all old template patterns are fully removed to prevent conflicts
|
||||||
with the new setup.</li>
|
with the new setup.</li>
|
||||||
@ -151,8 +150,3 @@
|
|||||||
see e.g. getDayNote() function.</p>
|
see e.g. getDayNote() function.</p>
|
||||||
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
|
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
|
||||||
can then be used by other scripts to add new notes to day note etc.</p>
|
can then be used by other scripts to add new notes to day note etc.</p>
|
||||||
<p>Journal also has relation <code>child:child:child:template=Day template</code> (see
|
|
||||||
[[attribute inheritance]]) which effectively adds [[template]] to day notes
|
|
||||||
(grand-grand-grand children of Journal). Please note that, when you enable
|
|
||||||
week notes or quarter notes, it will not automatically change the relation
|
|
||||||
for the child level.</p>
|
|
14
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html
generated
vendored
14
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html
generated
vendored
@ -40,7 +40,19 @@
|
|||||||
you can also mark templates with <code>#workspaceTemplate</code> to display
|
you can also mark templates with <code>#workspaceTemplate</code> to display
|
||||||
them only in the workspace.</p>
|
them only in the workspace.</p>
|
||||||
<p>Templates can also be added or changed after note creation by creating
|
<p>Templates can also be added or changed after note creation by creating
|
||||||
a <code>~template</code> relation pointing to the desired template note.</p>
|
a <code>~template</code> relation pointing to the desired template note. </p>
|
||||||
|
<p>To specify a template for child notes, you can use a <code>~child:template</code> relation
|
||||||
|
pointing to the appropriate template note. There is no limit to the depth
|
||||||
|
of the hierarchy — you can use <code>~child:child:template</code>, <code>~child:child:child:template</code>,
|
||||||
|
and so on.</p>
|
||||||
|
<aside class="admonition important">
|
||||||
|
<p>Changing the template hierarchy after the parent note is created will
|
||||||
|
not retroactively apply to newly created child notes.
|
||||||
|
<br>For example, if you initially use <code>~child:template</code> and later
|
||||||
|
switch to <code>~child:child:template</code>, it will not automatically
|
||||||
|
apply the new template to the grandchild notes. Only the structure present
|
||||||
|
at the time of note creation is considered.</p>
|
||||||
|
</aside>
|
||||||
<h2>Additional Notes</h2>
|
<h2>Additional Notes</h2>
|
||||||
<p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes,
|
<p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes,
|
||||||
allowing all instance notes (e.g., books) to display a specific icon and
|
allowing all instance notes (e.g., books) to display a specific icon and
|
||||||
|
14
docs/User Guide/!!!meta.json
vendored
14
docs/User Guide/!!!meta.json
vendored
@ -9341,6 +9341,13 @@
|
|||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 50
|
"position": 50
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "ivYnonVFBxbQ",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 60
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"name": "shareAlias",
|
"name": "shareAlias",
|
||||||
@ -9354,13 +9361,6 @@
|
|||||||
"value": "bx bx-calendar",
|
"value": "bx bx-calendar",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 40
|
"position": 40
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "relation",
|
|
||||||
"name": "internalLink",
|
|
||||||
"value": "ivYnonVFBxbQ",
|
|
||||||
"isInheritable": false,
|
|
||||||
"position": 60
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
|
@ -108,5 +108,3 @@ The default is `{year}`
|
|||||||
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.
|
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.
|
||||||
|
|
||||||
Day (and year, month) notes are created with a label - e.g. `#dateNote="2025-03-09"` this can then be used by other scripts to add new notes to day note etc.
|
Day (and year, month) notes are created with a label - e.g. `#dateNote="2025-03-09"` this can then be used by other scripts to add new notes to day note etc.
|
||||||
|
|
||||||
Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal). Please note that, when you enable week notes or quarter notes, it will not automatically change the relation for the child level.
|
|
@ -25,7 +25,13 @@ To create an instance note through the UI:
|
|||||||
|
|
||||||
For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
|
For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
|
||||||
|
|
||||||
Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note.
|
Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note.
|
||||||
|
|
||||||
|
To specify a template for child notes, you can use a `~child:template` relation pointing to the appropriate template note. There is no limit to the depth of the hierarchy — you can use `~child:child:template`, `~child:child:child:template`, and so on.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> Changing the template hierarchy after the parent note is created will not retroactively apply to newly created child notes.
|
||||||
|
> For example, if you initially use `~child:template` and later switch to `~child:child:template`, it will not automatically apply the new template to the grandchild notes. Only the structure present at the time of note creation is considered.
|
||||||
|
|
||||||
## Additional Notes
|
## Additional Notes
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user