1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 04:21: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:
Gerasimos (Makis) Maropoulos
2020-08-05 19:34:55 +03:00
parent b363492cca
commit 5d480dc801
22 changed files with 282 additions and 66 deletions

View File

@@ -241,6 +241,11 @@ type Party interface {
// Returns the GET *Route.
Favicon(favPath string, requestPath ...string) *Route
// RegisterView registers and loads a view engine middleware for that group of routes.
// It overrides any of the application's root registered view engines.
// To register a view engine per handler chain see the `Context.ViewEngine` instead.
// Read `Configuration.ViewEngineContextKey` documentation for more.
RegisterView(viewEngine context.ViewEngine)
// Layout overrides the parent template layout with a more specific layout for this Party.
// It returns the current Party.
//