Searching docs and forums to see if this is possible. Can’t see anybody trying to do it other than me though (which surprises me …)
What I’m trying to do
I want to create a new note by selecting a template. By default this is created in the root folder of the vault.
What I want to do is specify in which folder a new note from a specific template should be created. There could eg. be multiple templates that create notes in my “Personal” folder. As it stands I can link a single template to a folder, and then all notes created there will use that template - this is great for daily/weekly etc. but not so great when I want multiple different types of notes in the same folder (to try and keep a relatively flat structure…)
eg.
Templates:
Book notes
Quote
Person
Project idea
Story idea
Book notes, Quote and Person might all create notes under “Personal”, Project Idea might create a note under “Dev”, and Story idea might create a note under “Writing”.
Templates are notes like any other. The reason why the templates/templater plugin finds them is because they are all in one specific folder. So “linking a single template to a folder, [such that] files created there will use that template” is not feasible (at least if this means that your templates are a little bit everywhere in the document tree).
Solution 1:
However, “linking a single template to a folder” is still easily possible with templater plugin and a moving-promt. Just add e.g. <% tp.file.move("/your-path/Quote/" + tp.file.title) %> to the Quote-Template and any file this template will be inserted to, will automatically moved to the respective folder.
Solution 2:
If you have many similar (or even identical) templates for multiple folders and you want to avoid duplicating the templates, you may consider setting a hotkey for the File explorer: Move file to another folder command (I use Ctr/Cmd+M).
Also for consistency between similar templates if found it is good advice to make a change-log note for your templates.
Hope this helps and my suggestion is not too much “the other way around”
A short addendum to solution 1: If you put the command on a separate line you will end up with an empty line after inserting the template to the note. So just append it to any existing line and you will be fine