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