What I’m trying to do
Use the QUICKADD plugin to create a new note in a subfolder of the folder containing the current note.
Things I have tried
Using a “Capture” type add-method, but I cannot find a variable containing the currentlink’s path
Use the QUICKADD plugin to create a new note in a subfolder of the folder containing the current note.
Using a “Capture” type add-method, but I cannot find a variable containing the currentlink’s path
SOLVED MY OWN PROBLEM:
I don’t think you can use quick add since you cannot variablize the folder structure. Instead I used Templater and scripted it to create sub folders.
The following code is placed inside an empty template and then triggered to create the folder.
To use, add this code to an empty template:
<%-*
const title = await tp.system.prompt(“SUB Folder Note”);
const dir = require(“path”).dirname(tp.file.path(true)) + “/” + title;
await this.app.vault.createFolder(dir);
await tp.file.create_new(“”, title + “/” + title + “.md”, false);
tp.file.cursor_append(“[[” + title + "]] ");
-%>
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.