Example #1
0
// Create a web.go compatible function that returns a string that is the HTML for this page
func GenerateHTMLwithTemplate(page *onthefly.Page, tvg webhandle.TemplateValueGenerator) func(*web.Context) string {
	return func(ctx *web.Context) string {
		values := tvg(ctx)
		return mustache.Render(page.GetXML(true), values)
	}
}