Insert Template inside a template

What I’m trying to do

I am writing a templater script in which I also want to include another template. Does anyone know how can I do it.

Things I have tried

I have searched various threads and forums but not able to find anything.

Are you talking about the core template engine? Or the Templater plugin? Using the latter examples are found in the documentation on how to do this rather easily.

I’m talking about the Templater plugin…I tried using tp.file.include but it just copies the content of that file. What I want is for automatic updation of the frontmatter as well as the Headings in the new template.

my use case: I am creating a base template and want the content and frontmatter of this template to be applied to other sub templates that I am creating.

Eg: file tmplate1:


now I have second template file template2:

/* Include template 1 file and update the frontmatter and other info as well */

you might be able to nest templater code with this commenting technique:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.