I’m wondering if there’s a way to create a new page from a template and provide some values to help fill in the template. I currently have multiple page templates set up for organizing lecture notes, but they all end up almost exactly the same aside from a few key things related to the specific course. I’d like to combine them into a single template, but I don’t know how to go about letting the template know which course the notes are for.
I’m aware of the “template(t, args)” function in the expression language, which works fine for live templates but (at least in my testing) not for page templates
placing {{template(my_template, course_name)}} in my page template results in an error: “Function renderTemplate is not available in client”
I’ve attempted to make a space script using the renderTemplate syscall referenced above (template.renderTemplate from syscalls - @silverbulletmd/silverbullet - JSR), but the documentation is pretty minimal and I have not been able to get it working. If anyone could demonstrate the usage of the renderTemplate syscall or suggest a different method of achieving this, I would greatly appreciate it!