Things I have tried
<%* let title = tp.file.title
if (title.startsWith(“Untitled”))
{title = await tp.system.prompt(“Title”);
await tp.file.rename(${title});} tR += “—”
%>
# <% tR += ${title} %>*
which I found in this forum, but it doesn’t work for me… any ideas?
What I’m trying to do
When I have tp.file.title elemts in my page then they are all “Untitles” by default, when I create a new note, because initially that’s the title, makes sense, but when I rename the page it doesn’t change. I want to be able to have the titles in my templates change when I change the title so that I don’t have to retype it everytime where instead of the title there is an “Untitled”.