diff --git a/template.go b/template.go index 4e75e39f..5c56da74 100644 --- a/template.go +++ b/template.go @@ -34,6 +34,8 @@ func init() { beegoTplFuncMap["htmlquote"] = Htmlquote beegoTplFuncMap["htmlunquote"] = Htmlunquote beegoTplFuncMap["renderform"] = RenderForm + beegoTplFuncMap["assets_js"] = AssetsJs + beegoTplFuncMap["assets_css"] = AssetsCss // go1.2 added template funcs // Comparisons diff --git a/utils.go b/utils.go index 0e2b8e13..fafe4190 100644 --- a/utils.go +++ b/utils.go @@ -388,3 +388,22 @@ func GetRandomString(n int) string { func UrlFor(endpoint string, values ...string) string { return BeeApp.UrlFor(endpoint, values...) } + + +//This can be changed to a better name +func AssetsJs(src string) template.HTML { + text := string(src) + + text = "" + + return template.HTML(text) +} + +//This can be changed to a better name +func AssetsCss(src string) template.HTML { + text := string(src) + + text = "" + + return template.HTML(text) +}