mirror of
https://github.com/kataras/iris.git
synced 2026-01-04 10:47:20 +00:00
Embrace the feature request for per-party layout https://github.com/kataras/iris/issues/180
This commit is contained in:
@@ -163,6 +163,8 @@ func (t *Template) Render(ctx context.IContext, name string, binding interface{}
|
||||
_layout := ""
|
||||
if len(layout) > 0 {
|
||||
_layout = layout[0]
|
||||
} else if layoutFromCtx := ctx.GetString(config.TemplateLayoutContextKey); layoutFromCtx != "" {
|
||||
_layout = layoutFromCtx
|
||||
}
|
||||
if _layout == "" {
|
||||
_layout = t.Layout
|
||||
|
||||
Reference in New Issue
Block a user