Ejemplo n.º 1
0
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
}
Ejemplo n.º 2
0
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
}
Ejemplo n.º 3
0
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
}