Layout overrides the parent template layout with a more specific layout for this Party. It returns the current Party. The "tmplLayoutFile" should be a relative path to the templates dir. Usage: app := iris.New() app.RegisterView(iris.$VIEW_ENGINE("./views", ".$extension")) my := app.Party("/my").L
(tmplLayoutFile string)
| 1811 | // |
| 1812 | // Examples: https://github.com/kataras/iris/tree/main/_examples/view |
| 1813 | func (api *APIBuilder) Layout(tmplLayoutFile string) Party { |
| 1814 | handler := func(ctx *context.Context) { |
| 1815 | ctx.ViewLayout(tmplLayoutFile) |
| 1816 | ctx.Next() |
| 1817 | } |
| 1818 | |
| 1819 | api.Use(handler) |
| 1820 | api.UseError(handler) |
| 1821 | |
| 1822 | return api |
| 1823 | } |
nothing calls this directly
no test coverage detected