What I’m trying to do
So I’ve been working on some templates for my DND notes with Templater. Currently I was working on a template for a note for when we meet/hear about a new clan, but I’m getting a Template Parsing error when I try to create a new note from the template (both right click → ‘Create new note from Templater template’ and the ‘ctrl + shift + c’ hotkey I set up.
It’s specifically this template that’s doing this, I have another template for plot notes that still works. Even stranger, when I look at the console to see what’s failing the error chain is reporting a series of errors in the javalent Calendarium plugin I have installed.
I do have couple of Calendarium events that are tied to my plot notes, but I have note parsing off and nothing pointing from Calendarium to where I’m storing the notes this template is generating, so I’m just really confused.
Things I have tried
I looked at posts here and on the githubs for Templater and Calendarium to see if what other people encountering this did. The parsing errors reported here and on the Templater repo were most commonly caused by either syntax errors or an edge case that would error out if the template was only creating frontmatter but no body. I combed through my code and tightned up my syntax ass much as I could, tested, then added some content to the body of the template and tested again. I got the exact same error both times.
I’ll post the template code below. Any help would be appreciated.
<%*
let title = tp.file.title;
let name = await tp.system.prompt("What is the clan name?");
let plural = null;
let i = (await tp.system.suggester(["Yes", "No"], [true, false], false, "Is the plural different from the singular?");
if (i) {
let plural = await.system.prompt("What is the plural?");
}
let villain = await tp.system.suggester(["Yes", "No"], [true, false], false, "Are they bad guys?");
if (title.startsWith("Untitled"))
{
title = "The " + name + " Clan";
} await tp.file.rename(title);
tp.file.move("/Organizations/");
%><% "---" %>
tags:
- Organization
<%* if (villain) { %>
- Villain
<%* } %>
aliases:
- <% name %>
<%* if (plural != null) { %>
- <% plural %>
- "The " + <% plural %>
<%* } else { %>
- "The " + <% name %>
<%* } %>
<% "---" %>
Members:
-
