1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

builtin html template functions changes

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-12-13 01:37:15 +02:00
parent abeae40e60
commit 1ea5cd58be
115 changed files with 472 additions and 230 deletions

View File

@@ -103,8 +103,8 @@ func (s *HandlebarsEngine) Reload(developmentMode bool) *HandlebarsEngine {
}
// Layout sets the layout template file which should use
// the {{ yield }} func to yield the main template file
// and optionally {{partial/partial_r/render}} to render
// the {{ yield . }} func to yield the main template file
// and optionally {{partial/partial_r/render . }} to render
// other template files like headers and footers.
func (s *HandlebarsEngine) Layout(layoutFile string) *HandlebarsEngine {
s.layout = layoutFile
@@ -238,7 +238,7 @@ func (s *HandlebarsEngine) ExecuteWriter(w io.Writer, filename string, layout st
if context == nil {
context = make(map[string]interface{}, 1)
}
// I'm implemented the {{ yield }} as with the rest of template engines, so this is not inneed for iris, but the user can do that manually if want
// I'm implemented the {{ yield . }} as with the rest of template engines, so this is not inneed for iris, but the user can do that manually if want
// there is no performance cost: raymond.RegisterPartialTemplate(name, tmpl)
context["yield"] = raymond.SafeString(contents)
}