Using this Templater script results in a Templater Error: Template parsing error, aborting. Cannot read properties of undefined (reading 'createEl') error.
As far as I see, dv.markdownTaskList does something similar to dv.taskList (the method used in my first code example) - I’ll definitely check how the two are different.
But my question was mainly about the second code snippet - if it’s possible, at all, to use Templater’s own syntax in combination with the DataView methods. Based on what I see on this forum (in other topics), this type of combination works, generally, but there’s no topic/resource showing or explaining how it works specifically with dv.taskList (or dv.markdownTaskList).
I’m really just curious - my template works after all, with the inclusion of my first code example, but but I see that many Obsidian users use a "Templater syntax with DataView methods" combo instead of the "DV only" approach.
Did you even try your second code snippet with dv.markdownTaskList() instead of dv.taskList()? If so, what happened?
The main difference between those two is that the markdown variant returns the markdown text, whilst the other manipulates the DOM (or html output). And when you’re still in the template execution the DOM is not available.
Damn it, it works!! - Sorry, @holroy , I think I totally didn’t misunderstood your previous reply, but I just tested the dv.markdownTaskList() function inside the Templater script, and it works beautifully!!
Thanks for your help.
For others facing the same problem/curious about the solution that works: