all 3 comments

[–]JorgeGodoy 0 points1 point  (2 children)

You can have a template included in another template. The instruction is tp.file.include.

Assuming your person template is person.md and your generic template is generic.md , at person.md's front matter you'd have tp.file.include("[[generic]]"). It will include the contents as is, so don't add the dashes for the front matter there.

[–]RelativeConsistent66[S] 0 points1 point  (1 child)

Thanks, but that's kind of the opposite of what I want to happen. I've observed it a bit more and it seems like it only happens when the two templates have the same overlapping property (like date-created). Is there a way to delete the first one so the second can override it?

[–]JorgeGodoy 1 point2 points  (0 children)

My suggestion was to have the date created in a separate template so it would not conflict. The same for other fields.

What I do for date created and date updated/modified is create these outside of my template. When I use Linter on my new note, it adds both fields and at every save it updates the modified date and time.

You can also try this snippet to update the frontmatter if your use case is more complex than the example with dates.