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
Plugin information (please complete the following information):
OS: Windows 11
Templater version: 2.3.3
Obsidian version: 1.6.3
Templater settings: default
Describe the bug
A template is expected to generate different files for different folders when using it to generate files recursively in folders. But the resulting files are the same.
Wild guess: You are running into trouble because Templater does not create a new tp-object when you call tp.file.create_new, so there are no seperate instances of tp and thus tp.file.title is not scoped differently per file.
However, I do not understand your template to begin with - why call that template file recursively when you are iterating over all folders anyway? What is the purpose of using both the for-loop and recursion?
To achieve what you are trying to do (maybe? possibly? who knows?), why not just use the loop to create the files and parse the content like this:
Plugin information (please complete the following information):
Describe the bug
A template is expected to generate different files for different folders when using it to generate files recursively in folders. But the resulting files are the same.
Expected behavior
Suppose there is a vault like this:
template.md
:Now use
template.md
to generate aUntitled.md
file in the root directory:Results:
Untitled.md
:dir1.md
dir2.md
dir11.md
dir12.md
dir21.md
dir22.md
:(Expected to be their own titles)
The text was updated successfully, but these errors were encountered: