tplimpl: Reintroduce the double template lookup in Partial

So it works as before without the html suffix.

Fixes #3272
This commit is contained in:
Bjørn Erik Pedersen
2017-04-04 17:21:04 +02:00
parent 7da1b65968
commit bc36d468ab
2 changed files with 38 additions and 0 deletions

View File

@@ -63,6 +63,10 @@ func (t *templateFuncster) partial(name string, contextList ...interface{}) (int
for _, n := range []string{"partials/" + name, "theme/partials/" + name} {
templ := t.Tmpl.Lookup(n)
if templ == nil {
// For legacy reasons.
templ = t.Tmpl.Lookup(n + ".html")
}
if templ != nil {
b := bp.GetBuffer()
defer bp.PutBuffer(b)