Hello.
I have a Templater template for creating dictionary notes:
<%*
let title = tp.file.title
if (title.startsWith("Untitled")) {
title = await tp.system.prompt("Title");
await tp.file.rename(title);
}
tR += "---"
%>
tags:
- dictionary
- writing
location:
author:
source:
date: <% tp.date.now("YYYY-MM-DD") %>
created: <% tp.file.creation_date("YYYY-MM-DDTHH:mm:ss") %>
links:
- "[[Categories]]"
category: "[[Dictionary]]"
summary: ""
---
# [[<% title %>]]
> [!info] **[[<% title %>]]** | pronunciation |
>
> **type**
> XXX
>
> **ORIGIN**
> XXX
OED: [<% title %>](dict://<% title %>)
If I add <% await tp.file.move("/Dictionary/" + tp.file.title) %>
to the template (see below), the file is moved to the Dictionary
folder, but I have to enter the file title twice.
<% await tp.file.move("/Dictionary/" + tp.file.title) %><%*
let title = tp.file.title
if (title.startsWith("Untitled")) {
title = await tp.system.prompt("Title");
await tp.file.rename(title);
}
tR += "---"
%>
tags:
- dictionary
- writing
location:
author:
source:
date: <% tp.date.now("YYYY-MM-DD") %>
created: <% tp.file.creation_date("YYYY-MM-DDTHH:mm:ss") %>
links:
- "[[Categories]]"
category: "[[Dictionary]]"
summary: ""
---
# [[<% title %>]]
> [!info] **[[<% title %>]]** | pronunciation |
>
> **type**
> XXX
>
> **ORIGIN**
> XXX
OED: [<% title %>](dict://<% title %>)
Is it possible to get the prompt for the file title to only appear once and for the file to be moved to the Dictionary
folder?
With thanks