diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-06-02 18:08:17 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-06-02 19:02:10 +0200 |
commit | f8c67f93e123a7ac1c9c7af8000cc9d1fd978cd7 (patch) | |
tree | 6de6c2f34f79289b8be7263b29ded2b0557bb73b /output/layout.go | |
parent | 3d9235e8fcf31553c0c0f313d3264f12438749ea (diff) |
Allow hook template per section/type
Fixes #7349
Diffstat (limited to 'output/layout.go')
-rw-r--r-- | output/layout.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/output/layout.go b/output/layout.go index e59404684..09ac7b2f6 100644 --- a/output/layout.go +++ b/output/layout.go @@ -134,15 +134,16 @@ func resolvePageTemplate(d LayoutDescriptor, f Format) []string { b := &layoutBuilder{d: d, f: f} + if !d.RenderingHook && d.Layout != "" { + b.addLayoutVariations(d.Layout) + } + if d.Type != "" { + b.addTypeVariations(d.Type) + } + if d.RenderingHook { b.addLayoutVariations(d.Kind) - } else { - if d.Layout != "" { - b.addLayoutVariations(d.Layout) - } - if d.Type != "" { - b.addTypeVariations(d.Type) - } + b.addSectionType() } switch d.Kind { |