handle nested templates
This commit is contained in:
parent
dc7cc9e7dc
commit
3c182fc1df
1 changed files with 2 additions and 1 deletions
|
@ -11,7 +11,8 @@ var (
|
|||
)
|
||||
|
||||
func Load() {
|
||||
Templates = template.Must(template.ParseGlob("tem/html/*.html"))
|
||||
func_map := template.FuncMap{}
|
||||
Templates = template.Must(template.New("").Funcs(func_map).ParseGlob("tem/html/**/*.html"))
|
||||
fmt.Println("templates loaded")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue