FallbackView registers one or more fallback views for a template or a template layout. Usage: FallbackView(iris.FallbackView("fallback.html")) FallbackView(iris.FallbackViewLayout("layouts/fallback.html")) OR FallbackView(iris.FallbackViewFunc(ctx iris.Context, err iris.ErrViewNotExist) error {
(provider context.FallbackViewProvider)
| 1784 | // [...custom logic e.g. ctx.View("fallback", err.Data)] |
| 1785 | // }) |
| 1786 | func (api *APIBuilder) FallbackView(provider context.FallbackViewProvider) { |
| 1787 | handler := func(ctx *context.Context) { |
| 1788 | ctx.FallbackView(provider) |
| 1789 | ctx.Next() |
| 1790 | } |
| 1791 | api.Use(handler) |
| 1792 | api.UseError(handler) |
| 1793 | } |
| 1794 | |
| 1795 | // Layout overrides the parent template layout with a more specific layout for this Party. |
| 1796 | // It returns the current Party. |
nothing calls this directly
no test coverage detected