Working with layouts
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
|
||||
// renderTemplate renders a HTML template file
|
||||
func RenderTemplate(w http.ResponseWriter, tmpl string) {
|
||||
parsedTemplate, _ := template.ParseFiles("./templates/" + tmpl)
|
||||
parsedTemplate, _ := template.ParseFiles("./templates/"+tmpl, "./templates/base.layout.tmpl")
|
||||
err := parsedTemplate.Execute(w, nil)
|
||||
if err != nil {
|
||||
fmt.Println("error parsing template:", err)
|
||||
|
Reference in New Issue
Block a user