You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this time, the template it created in "new template" is already resolved! Making it useless as a template.
template made on: 2024-09-24
this note made on: 2024-09-24
Expected behavior
The resulting file when using tp.file.create_new with a template should be the same as the resulting file when using that same template with Templater's own insert button.
Instead, the former resolves templates in the new file too many times.
The text was updated successfully, but these errors were encountered:
This bug is being caused by this line, which is ran on file creation. We'll need to find a way to not run this line of code when using tp.file.create_new() to resolve this bug.
This is similar to #1381, except in their case they're running the Create new note from template command instead of calling tp.file.create_new() from the Open insert template modal command. Fixing one of these will likely fix the other.
For now, I have worked around it by simply going another layer deeper and writing the template within a template within another template. It looks messy, but it does work. I will try your workaround
I think I'm also having an issue related to this. I'm using the Local REST API plugin to append to my daily note but if the daily note doesn't exist, Templater seems to run twice and removes the content that was appended.
Plugin information
Describe the bug
I have a template I use to create other templates (call it "template template") in my templates folder:
If I create a new note, then insert this template with Templater's sidebar button, I get the expected template out:
Now, I have yet another template that, when run, will generate a new template from this "template template"
But this time, the template it created in "new template" is already resolved! Making it useless as a template.
Expected behavior
The resulting file when using
tp.file.create_new
with a template should be the same as the resulting file when using that same template with Templater's own insert button.Instead, the former resolves templates in the new file too many times.
The text was updated successfully, but these errors were encountered: