1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-02 17:57:11 +00:00

New feature: Fallback views. Read HISTORY.md

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-01-24 14:08:37 +02:00
parent a2588e480d
commit 435f284815
16 changed files with 316 additions and 44 deletions

View File

@@ -421,14 +421,14 @@ func (s *HTMLEngine) ExecuteWriter(w io.Writer, name string, layout string, bind
t := s.Templates.Lookup(name)
if t == nil {
return ErrNotExist{name, false}
return ErrNotExist{name, false, bindingData}
}
s.runtimeFuncsFor(t, name, bindingData)
if layout = getLayout(layout, s.layout); layout != "" {
lt := s.Templates.Lookup(layout)
if lt == nil {
return ErrNotExist{layout, true}
return ErrNotExist{layout, true, bindingData}
}
s.layoutFuncsFor(lt, name, bindingData)