Hello,
I’m using the Templater plugin, and I’d like to make a template that allows me, when I use it with the “create new note from template” command, to enter the title of the new note in a pop-up that not only fills in a “Title” property but also replaces with this entered title the default “Untitled” title of this new note. I’m pretty bad at programming…
Things I have tried
I’ve figured out how to enter the title in the property with <% tp.system.prompt(“Note title”) %> but I don’t know how to get it back for the note title… Thanks for your help.
Not an expert in Templater, but I had a similar problem, then I read somewhere that you can not name it, but you can rename it. This I have in my template …
Hello @DiCaver, @Pch and @Guapa ! Thanks for your help. I have finally made a mix of all your advices and done this :
<%*
let title = tp.file.title
if (title.startsWith(“Untitled”)) {
title = await tp.system.prompt(“Title”);
}
await tp.file.move(“/XXX/xxx/” + title)
tR += “—”
%>
uuid: <% tp.user.uuid() %>
title: <% title %>
author:
But I think that the Templater plugin may be too difficult for me to use, so maybe I would better find an alternative.
How do you create your templates ? Please share with me some good ideas
Thanks in advance for your replies !