When would Templater do this? Templater can’t trigger when you manually insert text onto the main note. Maybe for that kind of action you could use Linter plugin, to verify that links in frontmatter exists, and create it not.
Another option, but I’m not sure how achievable the is, that you could use Templater to create all new files, and then backtrack where the link is found in the originating file to see that this is an author link, and then select the author template.
I believe the most common method would be to insert the link using Templater based on some suggester indicating this is to be an author link. Or possibly to have a fully qualified link into an authors folder, and then use folder templates.
In other words, it all comes down to what’s your workflow and how do unsert that author property in the first place.
the workflow that i’m thinking is basically when i click on the new note (and thus triggering a note creation) it finds the frontmatter property it’s in and conditionally applies a template.
Still a little vague, or I’m just dense today, do you want a property of the originating file where you clicked on the link to create a new note? If so, then you’d need to look into reading the file using javascript somehow, as the frontmatter of this file is not shown to the newly created file (although you can get to this file using something like tp.config.target_file.parent).
You can’t really get to the frontmatter of the note you’re creating using tp.frontmatter, since you’ve not created this file yet… So what should it reflect to you?!
thank you!
yeap, i’m looking on something like what you’re describing.
access the frontmatter of the parent and based on that apply a template on the new newly created note.
any direction you could point me to for the js?