I am having a hard time figuring out the syntax. It’s not explicitely mentioned in the docs at all and its driving me mental. Is there an overview of how to use anything besides functions?
What I’m trying to do
I simply want to code more complex templates than simply printing out a piece of data.
Currently my example is to simply check if the file has a property set up yet (is property null?) and then I want to add that property if it doesnt exist with the current date as value.
I have so many questions.
I don’t even know what the correct syntax for if statements are.
Are there loops?
Does it know types and can i save stuff in variables?
Does it use null?
Things I have tried
The doc said to get the properties over the frontmatter library. In the example it shows you can use a “map” func if the property is an array. Where does that come from? Is it merely javascript?
<% if (tp.frontmatter["end-time"] == "undefined") { %>End date exists<% } else { %>End date doesnt exist<% } %>
Does not work. I used “undefined” because that’s what was being printed for my (non existent) property. Null didn’t work either.
Thank you for any hints!