Answer the question
In order to leave comments, you need to log in
How to correctly pass a value to a template with inheritance?
Hello! There are three files:
{{template "header"}}
other templates are included ( ), in header.html itself the title tag is filled like this: <title>{{.Title}}</title>
type Page struct {
Title string
}
t.ExecuteTemplate(w, "header", p) // type Page struct
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question