Skip to content

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

@yeungon

Description

@yeungon

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions