Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems multitemplate does not support nested template unless we need to load the template files twice. #65

Open
yeungon opened this issue Dec 26, 2024 · 0 comments

Comments

@yeungon
Copy link

yeungon commented Dec 26, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant