mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
Ability to register a view engine per group of routes or for the current a chain of handlers
Example at: https://github.com/kataras/iris/tree/master/_examples/view/context-view-engine
This commit is contained in:
@@ -21,10 +21,11 @@ func Ace(directory, extension string) *HTMLEngine {
|
||||
once := new(sync.Once)
|
||||
s.middleware = func(name string, text []byte) (contents string, err error) {
|
||||
once.Do(func() { // on first template parse, all funcs are given.
|
||||
for k, v := range s.funcs {
|
||||
for k, v := range emptyFuncs {
|
||||
funcs[k] = v
|
||||
}
|
||||
for k, v := range emptyFuncs {
|
||||
|
||||
for k, v := range s.funcs {
|
||||
funcs[k] = v
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user