My use case might be very specific - I haven’t found any corresponding information in the knowledge base, at least. Unless I’m doing something wrong, this might be unwanted behaviour or a bug of the Templates Core Plugin.
I’m not using the community plugin Templater, only the Templates Core Plugin, the limited variables are enough for my specific use case. The frontmatter for each of my templates looks approx. like this:
(template file: 06.111 Casting.md)
---
created: {{date}}
updated: {{date}}
template: "[[06.111 Casting]]"
---
# {{title}}
This way, whenever I apply a template to a new note, a link to the template is maintained in the frontmatter. Consequently, all new notes have access to the notes that refer to the template. That works as expected. When I change the name of the template. All links refering to the template, including the link inside the template itself, are updated correctly.
The only problem I have, however, is that for some reason with any change of the template file name, all variables in its frontmatter are converted into strings. Variables outside of the frontmatter remain untouched:
---
created:
"{ date }":
updated:
"{ date }":
template: "[[06.222 Casting]]"
---
# {{title}}
It makes no difference, if I add date-formats to the code, the variables are converted into strings anyway:
---
created:
"{ date:YYYY-MM-DD }":
updated:
"{ date:YYYY-MM-DD }":
template: "[[06.103 Casting]]"
---
# {{title}}
Is there anything I can do to prevent this and maintain the template variables as variables after any file name change, or should this be filed as a bug/unwanted behaviour?


