Adding support for embedded templates

This commit is contained in:
spf13 2014-01-09 17:27:39 -05:00
parent f78e2cb854
commit 13b067b506

View file

@ -167,9 +167,18 @@ func NewTemplate() Template {
}
templates.Funcs(funcMap)
templates.LoadEmbedded()
return templates
}
func (t *GoHtmlTemplate) LoadEmbedded() {
}
func (t *GoHtmlTemplate) AddInternalTemplate(prefix, name, tpl string) error {
return t.AddTemplate("_internal/"+prefix+"/"+name, tpl)
}
func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
_, err := t.New(name).Parse(tpl)
if err != nil {