From f3aa6adb652a849a7ecd6632b4f78c42ab6ab924 Mon Sep 17 00:00:00 2001 From: Jin <22962980+JYC333@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:14:42 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Update=20day=20not?= =?UTF-8?q?e=20and=20template=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Advanced Showcases/Day Notes.html | 10 ++-------- .../User Guide/Advanced Usage/Templates.html | 14 +++++++++++++- docs/User Guide/!!!meta.json | 14 +++++++------- .../Advanced Usage/Advanced Showcases/Day Notes.md | 4 +--- .../User Guide/Advanced Usage/Templates.md | 8 +++++++- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html index 28c1a2376..dc470ea0f 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html @@ -55,8 +55,7 @@
To transition to the new system:

  1. Set up the new template pattern in the Calendar root note.
  2. -
  3. Use Bulk Actions to - remove child:template and child:child:template from +
  4. Use Bulk Actions to remove child:template and child:child:template from all notes under the Journal (calendar root).
  5. Ensure that all old template patterns are fully removed to prevent conflicts with the new setup.
  6. @@ -150,9 +149,4 @@

    Trilium has some special support for day notes in the form of backend Script API - 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.

    -

    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.

    \ No newline at end of file + can then be used by other scripts to add new notes to day note etc.

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html index c0ebf0b9c..4c91ffc9c 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Templates.html @@ -40,7 +40,19 @@ 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.

    + 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.

    +

    Additional Notes

    From a visual perspective, templates can define #iconClass and #cssClass attributes, allowing all instance notes (e.g., books) to display a specific icon and diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index 7a127419a..18b4c3d03 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -9341,6 +9341,13 @@ "isInheritable": false, "position": 50 }, + { + "type": "relation", + "name": "internalLink", + "value": "ivYnonVFBxbQ", + "isInheritable": false, + "position": 60 + }, { "type": "label", "name": "shareAlias", @@ -9354,13 +9361,6 @@ "value": "bx bx-calendar", "isInheritable": false, "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "ivYnonVFBxbQ", - "isInheritable": false, - "position": 60 } ], "format": "markdown", diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md index c774a82fa..63e349262 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md +++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md @@ -107,6 +107,4 @@ 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. -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/User Guide/User Guide/Advanced Usage/Templates.md b/docs/User Guide/User Guide/Advanced Usage/Templates.md index 8ead4563d..88737e4a0 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Templates.md +++ b/docs/User Guide/User Guide/Advanced Usage/Templates.md @@ -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. -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