Obsidian Templates Variables

What I’m trying to do

i want to use the Obsidian Templates variables inside links in the frontmatter.

Things I have tried

this is my frontmatter:

tags:
  - meeting
date:
  - - "{{ date }}": 
transcript: "[[transcripts/{{ title }}]]"

and neither title or date works

You can have one dash in the YAML.

Relevant Help sections:

fixed the one dash in the date part, but i still face the same issue where are the templates variables {{date}} and {{title}} do not get the value when the template is applied on a note.

to clarify, if i put {{date}} or {{title}} by itself in the frontmatter it works. it’s when i try to put them inside links that it breaks.

What do you mean by “breaks”, more precisely ? :thinking:

I mean, what do you see when you apply the template ? What do you get as a result ?
How and when do you apply the template ? (after naming the note ?)

This:

---
date: {{date}}
transcript: "[[transcripts/{{title}}]]"
---

… seems to work for me in the sandbox vault when I apply the template through the command palette (using the command Templates: Insert template) on a brand new empty note renamed simply test :woman_shrugging:

thank you! indeed it works when i’m applying the template with the command.

it doesn’t work when i’m applying it with QuickAdd.
looks like that it’s a known bug that hasn’t been solved for years.

1 Like

In your first example, you have spaces in your {{ title }}. Could that be the problem? (Edit: I missed your previous reply about it working with the command. Still worth pointing out.)

Template:

{{date}}
{{ date }}
{{date }}

Result:

2025-05-09
{{ date }}
{{date }}
2 Likes