multitemplate
multitemplate copied to clipboard
It seems multitemplate does not support nested template unless we need to load the template files twice.
Testing the example with multiple bases, I found that while it works quite well as designed, there is a caveat regarding nested templates.
Suppose we define a template:
{{define "test"}}
<p> Hello, test template! This is a nested one. </p>
{{end}}
and place it in the same folder as "article."
The file is supposedly loaded via the following code:
articles, err := filepath.Glob(templatesDir + "/articles/*.html")
If I include it in any template defined as the "content" template, it does not render the "test."
I might be missing something. Please clarify if that is the case. Thanks!