gino_m
September 14, 2023, 1:39pm
2
This is what templates are for.
Most people use the Templater community plugin.
A similar scenario was mentioned here:
How about using a Prompt Template with
<%-tp.file.include("[[template_name]]")-%> lines
in an if - else if - else conditional trio? This way you can default back to a template that you can use for anything else.
<%-* let filetype = await tp.system.suggester(["Auteur", "Contact", "Personnalité"], ["Auteur", "Contact", "Personnalité"], false, "Which template do you want to use?") -%>
<%-* if (filetype === "Auteur") { -%>
<%-tp.file.include("[[Templatename1]]")-%>
<%-* } else if (filetype === "…
There is a guide there as well. I think it’s better to learn a little bit about it (learn how to fish) than expect to be served a ready-made answer (the fish) each time.
3 Likes