Update a variable after execution #1354
Unanswered
LeonardoGentile
asked this question in
Help
Replies: 1 comment
-
I recommend storing what the user renames the file in a variable and referencing that instead of <%*
const title = await tp.system.prompt("New filename);
await tp.file.rename(title);
// ... more code
-%>
# <% title %> |
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 have a complex set of modules to select the template to use and ask the user to fill different variables. One of these steps is to ask for the title of the new note.
Everything work as expected but If my template include something like this
it won't work because at creation time the note is still untitled, its title will be set in one of the aforementioned steps.
So I wanted to invoke the
on_all_templates_executed
hook but not sure how to use it in this case as all the the examples shows to run some operations on post-execution, in this case I just want to update the content of the note.Is there a way to execute/invoke the above code on post execution?
The alternative is
Beta Was this translation helpful? Give feedback.
All reactions