diff --git a/HISTORY.md b/HISTORY.md
index 0e741499..fe4c3436 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -28,6 +28,8 @@ The codebase for Dependency Injection, Internationalization and localization and
## Fixes and Improvements
+- **Breaking-change**: HTML template functions `yield`, `part`, `partial`, `partial_r` and `render` now accept (and require for some cases) a second argument of the binding data context too. Convert: `{{ yield }}` to `{{ yield . }}`, `{{ render "templates/mytemplate.html" }}` to `{{ render "templates/mytemplate.html" . }}`, `{{ partial "partials/mypartial.html" }}` to `{{ partial "partials/mypartial.html" . }}` and so on.
+
- Add new `URLParamSeparator` to the configuration. Defaults to "," but can be set to an empty string to disable splitting query values on `Context.URLParamSlice` method.
- [PR #1992](https://github.com/kataras/iris/pull/1992): Added support for third party packages on [httptest](https://github.com/kataras/iris/tree/master/httptest). An example using 3rd-party module named [Ginkgo](github.com/onsi/ginkgo) can be found [here](https://github.com/kataras/iris/blob/master/_examples/testing/ginkgotest).
diff --git a/_benchmarks/view/ace/main.go b/_benchmarks/view/ace/main.go
index b5f32ea6..4bd1bf10 100644
--- a/_benchmarks/view/ace/main.go
+++ b/_benchmarks/view/ace/main.go
@@ -20,5 +20,8 @@ func index(ctx iris.Context) {
}
ctx.ViewLayout("layouts/main")
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("
%s
", err.Error())
+ return
+ }
}
diff --git a/_benchmarks/view/ace/views/layouts/main.ace b/_benchmarks/view/ace/views/layouts/main.ace
index d90a58fe..b1e74baa 100644
--- a/_benchmarks/view/ace/views/layouts/main.ace
+++ b/_benchmarks/view/ace/views/layouts/main.ace
@@ -3,6 +3,6 @@ html
head
title {{.Title}}
body
- {{ yield }}
+ {{ yield . . }}
footer
= include partials/footer.ace .
diff --git a/_benchmarks/view/amber/main.go b/_benchmarks/view/amber/main.go
index 742fd668..4b63f684 100644
--- a/_benchmarks/view/amber/main.go
+++ b/_benchmarks/view/amber/main.go
@@ -22,5 +22,8 @@ func index(ctx iris.Context) {
// On Amber this is ignored: ctx.ViewLayout("layouts/main")
// Layouts are only rendered from inside the index page itself
// using the "extends" keyword.
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("
", err.Error())
+ return
+ }
}
diff --git a/_benchmarks/view/blocks/views/layouts/main.html b/_benchmarks/view/blocks/views/layouts/main.html
index 934080b2..7686db90 100644
--- a/_benchmarks/view/blocks/views/layouts/main.html
+++ b/_benchmarks/view/blocks/views/layouts/main.html
@@ -1 +1 @@
-{{.Title}}{{ template "content" . }}
\ No newline at end of file
+{{.Title}}{{ template "content" . }}
\ No newline at end of file
diff --git a/_benchmarks/view/django/main.go b/_benchmarks/view/django/main.go
index 4c625c49..ad6cc034 100644
--- a/_benchmarks/view/django/main.go
+++ b/_benchmarks/view/django/main.go
@@ -21,5 +21,8 @@ func index(ctx iris.Context) {
// On Django this is ignored: ctx.ViewLayout("layouts/main")
// Layouts are only rendered from inside the index page itself
// using the "extends" keyword.
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("
", err.Error())
+ return
+ }
}
diff --git a/_benchmarks/view/handlebars/views/layouts/main.html b/_benchmarks/view/handlebars/views/layouts/main.html
index 50a79f87..c37a0de8 100644
--- a/_benchmarks/view/handlebars/views/layouts/main.html
+++ b/_benchmarks/view/handlebars/views/layouts/main.html
@@ -1 +1 @@
-{{Title}}{{ yield }}
\ No newline at end of file
+{{Title}}{{ yield . }}
\ No newline at end of file
diff --git a/_benchmarks/view/html/main.go b/_benchmarks/view/html/main.go
index 214c4b11..494f1c76 100644
--- a/_benchmarks/view/html/main.go
+++ b/_benchmarks/view/html/main.go
@@ -20,5 +20,8 @@ func index(ctx iris.Context) {
}
ctx.ViewLayout("layouts/main")
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("
%s
", err.Error())
+ return
+ }
}
diff --git a/_benchmarks/view/html/views/layouts/main.html b/_benchmarks/view/html/views/layouts/main.html
index 379a5ffa..398a0aad 100644
--- a/_benchmarks/view/html/views/layouts/main.html
+++ b/_benchmarks/view/html/views/layouts/main.html
@@ -1 +1 @@
-{{.Title}}{{ yield }}
\ No newline at end of file
+{{.Title}}{{ yield . }}
\ No newline at end of file
diff --git a/_benchmarks/view/jet/main.go b/_benchmarks/view/jet/main.go
index c5888759..aa28cdf6 100644
--- a/_benchmarks/view/jet/main.go
+++ b/_benchmarks/view/jet/main.go
@@ -21,5 +21,8 @@ func index(ctx iris.Context) {
// On Jet this is ignored: ctx.ViewLayout("layouts/main")
// Layouts are only rendered from inside the index page itself
// using the "extends" keyword.
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("
%s
", err.Error())
+ return
+ }
}
diff --git a/_benchmarks/view/pug/main.go b/_benchmarks/view/pug/main.go
index fd4e340e..aa1affca 100644
--- a/_benchmarks/view/pug/main.go
+++ b/_benchmarks/view/pug/main.go
@@ -22,5 +22,8 @@ func index(ctx iris.Context) {
// On Pug this is ignored: ctx.ViewLayout("layouts/main")
// Layouts are only rendered from inside the index page itself
// using the "extends" keyword.
- ctx.View("index", data)
+ if err := ctx.View("index", data); err != nil {
+ ctx.HTML("