Note composer: How to link back to original note automatically?

When my note gets too big or I want to create turn it into a table-of-contents-note, outsourcing different blocks of text to different new notes, I am looking for a way to automatically create links to the original note in all new notes. The note composer plugin has the template functionality, but I cannot find a way to automatically insert the filename (not only the title, that lacks the folder name) into the new note.

Things I have tried

Looking at the help page Note composer - Obsidian Help , which lists the template variable {{fromTitle}}, but I am looking for something like {{fromFile}}. The fromTitle variable does not include the folder name. If I can insert that, then I can write in my template something like

Extracted from [[{{fromFile}}]]

which would then create an automated link back to the original note.

Is there a way to accomplish this?

What I’m trying to do

I was able to do this by using the Refactor Note plugin with settings

Default location: Same folder as current
File name prefix: {{date:YYMMDD-hhmmss}}
Transclude by default: off
Note link template: {{new_note_link}}
Refactored note template:

{{date:YYMMDD-hhmmss}}
Extracted from: {{link}}

{{new_note_content}}

Then mark the text and execute the command (Ctrl+P) “Extract selection to new note – Prefix only”

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.