Allow hook template per section/type

Fixes #7349
This commit is contained in:
Bjørn Erik Pedersen
2020-06-02 18:08:17 +02:00
parent 3d9235e8fc
commit f8c67f93e1
4 changed files with 26 additions and 11 deletions

View File

@@ -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 {