template that automates up:: [[parent note]] #1173
081isaac
started this conversation in
Ideas & Feature Requests
Replies: 4 comments 4 replies
-
What's the user flow? Are you clicking on a link to a note that doesn't exist, which is triggering a template that sets the |
Beta Was this translation helpful? Give feedback.
3 replies
-
Yes.
…On Sat, Sep 2, 2023 at 12:25 AM Zach Young ***@***.***> wrote:
So really, what you want is a link to the note that was previously open
before you opened this new note and applied a template to it. Does that
sound right?
—
Reply to this email directly, view it on GitHub
<#1173 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAUZFZPRPBWYPK6K52QDJVDXYKYNFANCNFSM6AAAAAA3ZHY6OM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I think I've found a better answer than my previous answer: <%*
const parentFile = tp.file.find_tfile(app.workspace.getLastOpenFiles()[0]);
const parentLink = app.fileManager.generateMarkdownLink(parentFile, tp.file.folder(true));
-%>
up:: <% parentLink %> Will keep it updated here if I find anything better. |
Beta Was this translation helpful? Give feedback.
0 replies
-
haha awesome man, this works. do you have like a crypto address for me to
compensate you
…On Sat, Sep 23, 2023 at 3:14 PM Zach Young ***@***.***> wrote:
I think I've found a better answer than my previous answer:
<%*const parentFile = tp.file.find_tfile(app.workspace.getLastOpenFiles()[0]);const parentLink = app.fileManager.generateMarkdownLink(parentFile, tp.file.folder(true));-%>up:: <% parentLink %>
Will keep it updated here
<https://zachyoung.dev/posts/templater-snippets#generating-links> if I
find anything better.
—
Reply to this email directly, view it on GitHub
<#1173 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAUZFZJWUL5RYJVQBKVE4CTX34YJBANCNFSM6AAAAAA3ZHY6OM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I follow a note organization system from Linking Your Thinking, and at the top of his template he has a place to link the parent note to better visualize in graph view and to connect the notes.
Example, a parent note could be technology. Then you could create a link to a new note inside of the technology note called phone. Inside of the phone note he applies a template that has "up:: " written at the top. But, every time he has to manually type in the parent note, in this case it would like "up:: [[technology]]". Is there a way to automate the linking of the parent note for the template?
Beta Was this translation helpful? Give feedback.
All reactions