func (this *ResultView) getTmpl(names mvc.MvcMeta) (tmpl *template.Template, ext string, err error) { ext = names[mvc.MVC_TYPE] if this.GetTmpl != nil { tmpl, err = this.GetTmpl(this.fmap) } else { tmpl, err = mvc.GetHtmlTmpl(mvc.GetTemplateRelPath(names, ext), this.fmap) if err != nil && ext != ".html" { tmpl, err = mvc.GetHtmlTmpl(mvc.GetTemplateRelPath(names, ".html"), this.fmap) ext = ".html" } } return }
func (this *HtmlView) getTmpl(names mvc.MvcMeta) (tmpl *template.Template, err error) { if this.GetTmpl != nil { tmpl, err = this.GetTmpl(this.fmap) } else { tmpl, err = mvc.GetHtmlTmpl(mvc.GetTemplateRelPath(names, ".html"), this.fmap) } return }
func (this *MultiView) getTmpl(names mvc.MvcMeta) (tmpl *template.Template, ext string, err error) { if this.GetTmpl != nil { tmpl, err = this.GetTmpl(this.fmap) } else { tmpl, err = mvc.GetHtmlTmpl(mvc.GetTemplateRelPath(names, ext), this.fmap) } return }