Please Help- Template, Formatting, YAML, General Code issue

Formatting and Crafting Yearly notes Template, Plus issues with header position vs YAML/Properties

At the moment, I’m working on a template for my Yearly Notes/Annual Review and for context; I’m largely following the tutorial from the following youtube video from FromSergio:

Can anyone help me create it the same way?
In general, I’m having a lot of trouble with a few somewhat obscure obstacles.
Namely, this screenshot:


At the top of his template he has the current year automatically embedded. (for yearly notes he’ll manually change it to the previous year after starting a new note. –BTW is it possible to automate that as well?)
Underneath the year (2022), he has what appears to be YAML with some basic info (title, created, date modified, aliases, and tags)
From what I understand, YAML always has to be at the top of the document, but in the video/screenshot, he has the YAML below the header (2022). Furthermore, as you know, Obsidian has recently updated YAML to now be Properties. Whenever I do the usual “—” the Properties feature shows up. And forces me to have it at the top vs under the header like in the screenshot. Can anyone help me figure that out?
Also with the info itself, what code would I use to have those lines prefilled? (The year at the top above YAML/properties, the title of the note, the date the note was created & last modified)

Things I have tried

I’ve seen a few threads on code for different configurations like using {{}} and other commands I’ve seen on the forums. For context, I’m a newer Obsidian user so I’m still learning.
I managed to get the following code to work for the date at the top:
<% tp.date.now(“YYYY”) %>

For the YAML/Properties, I’ve tried the following for the title:
<% tp.file.title %>
I don’t know what the code would be for the date & time created or date/time modified.

At the time of writing, this, I just discovered that YAML is now the “Properties” feature.
In effort to figure it out, and finish my Yearly notes template based on the FromSergio example, I watched this youtube video:

At 3:19 in the video, he demonstrates his template in an example by making a new note based on the template. However, he uses some sort of shortcut/hotkey to do it where a prompt window appears like this screenshot:

I have no idea what this shortcut is or this window that already has the title built in. He types the new title and the new note is updated with all the parameter from his template, screenshot below:


Can anyone explain what that hotkey or shortcut is & how to do that?

The following is an aside (not my main issue I need help with, just some confusion why code isn’t working)
Getting a bit frustrated with some codes not working at all, I searched the forums for examples.
Below is an example of a code I tried to put in my note template but the code not only didn’t work at all, but when I tried creating a note using the template, all of the code completely disappeared, including the regular text that was written


Below is a screenshot of me pasting the code (just to test it) and another screenshot of a new note using the template and it’s totally blank:

These are issues that are far easier to explain when verbally speaking with an expert in real life, but alas, I have no such person available to me. So I hope this post isn’t too convoluted to grasp and answer. I promise I’m not stupid, just a noob that is getting down all the first principles of Obsidian & what not.

Hope to hear back soon.
Warmest thanks,
John Adam White

There’s a lot going on here, but to start:

YAML does have to start on line one of the note. The 2022 in their clip is the Inline title and not part of the note body. You can turn the Inline title on or off in Settings > Appearance → Show inline title. If you turn on line numbers in Settings, you can verify that the first --- is on line one of the note.

The purple here is approximately the note content with the Inline title above.

2 Likes