Logic in templates?

I really want to be able to write conditional statements or even more advanced logic in my template files, e.g. only print on week days, or link to / include a weekly note on each of the week days items for that week etc.

I was able to do things like this in Obsidian, but i’ve so far been unable to find anything similar in LogSeq.

E.g.

<% if(today = week day) %>
h1. week day template
h3. [[Weekly goals for week <% weekOfTheYear %> <% year %>]]
h2. Todays ToDos
<% else %>
h1. No work today!
<% } %>

I searched for a plugin or way to do this, but didn’t find anything. The closest was https://logseqtemplates.com/ (which had no examples i could find with logic), or GitHub - sawhney17/logseq-smartblocks, which is kind of close, but much more limited than i was expecting and focuses on triggered templates instead of auto inserted ones by day.

1 Like