2017-07-18 21:17:23 +03:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
import (
|
2020-06-08 05:16:55 +03:00
|
|
|
"github.com/kataras/iris/v12/_examples/view/quicktemplate/templates"
|
2017-07-18 21:17:23 +03:00
|
|
|
|
2019-10-25 01:27:02 +03:00
|
|
|
"github.com/kataras/iris/v12"
|
2017-07-18 21:17:23 +03:00
|
|
|
)
|
|
|
|
|
2020-07-10 23:21:09 +03:00
|
|
|
// ExecuteTemplate renders a "tmpl" partial template to the `Context.ResponseWriter`.
|
2017-08-27 20:35:23 +03:00
|
|
|
func ExecuteTemplate(ctx iris.Context, tmpl templates.Partial) {
|
2020-07-20 13:36:39 +03:00
|
|
|
ctx.CompressWriter(true)
|
2017-07-18 21:17:23 +03:00
|
|
|
ctx.ContentType("text/html")
|
2020-07-10 23:21:09 +03:00
|
|
|
templates.WriteTemplate(ctx, tmpl)
|
2017-07-18 21:17:23 +03:00
|
|
|
}
|