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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user