1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-28 07:17:06 +00:00

Enhance the view engine's example for {{url ...}} and {{urlpath ...}} tmpl funcs for reverse routing.

Former-commit-id: ec3cda69e5cbe5a04842150011b3788b70055572
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-03-19 02:06:15 +02:00
parent 73dc9adf10
commit 0733ea37c0
5 changed files with 96 additions and 105 deletions

View File

@@ -268,7 +268,7 @@ func New(setters ...OptionSetter) *Framework {
// +------------------------------------------------------------+
s.Adapt(TemplateFuncsPolicy{
"url": s.URL,
"urlpath": s.policies.RouterReversionPolicy.URLPath,
"urlpath": s.Path,
}) // the entire template registration logic lives inside the ./adaptors/view now.
}