How to make a template automatically applied depending on which folder a note was made in, without using hotkeys or buttons

How to make a template automatically applied depending on which folder a note was made in, without using hotkeys or buttons?

I would imagine, using Templater plugin, you could do something like (not tested, this is from memory) below. However, Templater also offers “Folder Templates” which are fired when a file is created in a specific folder. That would probably be more straightforward.

<%* if (tp.file.path() == "Specific") { %>
<%-tp.file.include("[[Templates/Specific]]")%>
<%* } else { %>
<%-tp.file.include("[[Templates/General]]")%>
<%* } _%>

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