When a template is loaded into a note, the aliases of the template should be merged alongside the aliases of the note.
But after trying this, the whole note inclusive metadata (front matters?) are only copied into the note at the current curser position, and aliases are not merged:
I read in v1.4.5 changelog that this should be possible:
“Templates automatically merge properties with existing properties in the note”
Things I have tried
I use Obsidian only for two months 'till now and have no idea where to start solving this problem.
Does anyone have the same problem like me and/or a solution for me?
Thanks for helping me.
Yes - in YAML format there are two spaces befor the hyphen.
The Properties in documents are set to “Visible” and for creating the test note and test template I used this new format of 1.4.5 for the metadata → So two spaces are the default setting for multiple aliases.
This is an example of what a valid frontmatter looks like. This is something like what your template should be generating, with regard to:
Three dashes on top and bottom (nothing above three dashes and an empty line after the bottom ones.
Don’t make multiple three-dashed sections one below the other.
As @stef.rausch also pointed out, you need two spaces and a dash, then a space with your values (such as mine in the example).
Thank you gino-m.
I’m familiar to YAML-syntax and i’m fine with it by scripting them manually.
My intend is to merge aliases automatically with templates into existing notes. In Version 1.4.5 this should happen automatically. But when i load the temlates into the notes, the aliases are not merged and there are only another three-dashed YAML-sections added to the note.
Maybe the easiest way is to install the Global Search and Replace plugin (obsidian://show-plugin?id=global-search-and-replace). You can regex search for the aliases: key and replace it with your additional list values.
At least you only have to confirm 100 times the replacement.
Thanks for your help and your creative input. I think i will use your last suggestion for my notes.
I also found the solution for my problem today:
Untill now I used the external extension “Templater v1.16.0” and with this the aliases didn’merge after inserting the template.
Today i tried the core extension and the mere of aliases works. So i will only use the core extension and im happy with the result.
Thank you all for your input and help to find that solution.