Change YML title and date with templater

Change YML title and date with templater

I am trying to create a basic notes template, which I will use for most of my notes. I have two YML metadata (or property in Obsidian) I want templater to take care of:

  1. title
  2. date

I searched it up, and apparently these two could replace those data when I insert the template:

<% tp.file.title %>

``<% tp.date.now(“YYYY-MM-DD”) %>```

However it doesn’t seem to be working. Is there something I am missing?

Could anyone help me out? It would be greatly appreciated :slight_smile:

Here is a video to clarify what my problem is: Watch Recording 2024-04-23 112106 | Streamable

You are using the built-in templates “insert template” function instead of templater’s insert template.

If you want to use templater code, you have to use the templater plugin and use it’s insert template function.

1 Like

Thank you!
Haven’t thought of that😅