Cannot Access Content from Notes Linked at Depth > 1 (Beyond Immediate Children) #361
Unanswered
Olivmamman
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using Text Generator templates in Obsidian, I am trying to access content from notes that are linked multiple levels deep.
For example, if I have a structure like Note 1 links to Note 2, which links to Note 3, I want to run a template in Note 1 and retrieve content from Note 3.
My current attempt uses nested {{#each children}} loops: {{#each children}} {{#each children}} {{this.content}} {{/each}} {{/each}}.
However, this only seems to access the immediate children (Note 2 in this example), not the children's children (Note 3).
Based on the documentation, the {{children}} context variable represents "an array of notes or sub-notes that are cited or related to the primary note". It appears that this variable provides access only to the first level of linked notes and does not recursively populate children for subsequent levels.
Therefore, the challenge is finding a way, or determining if there is a way, to access note content from links that are at a depth of two or more within the note graph using Text Generator templates and their available context variables. The current documented context variables, including {{children}}, do not seem to support this deeper traversal.
Beta Was this translation helpful? Give feedback.
All reactions