mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
tpl: Fix layout fall back logic when layout is set in front matter but not found
Fixes #13630
This commit is contained in:
@@ -94,14 +94,10 @@ func (this TemplateDescriptor) doCompare(category Category, isEmbedded bool, oth
|
||||
}
|
||||
|
||||
if other.LayoutFromTemplate != "" && other.LayoutFromTemplate != layoutAll {
|
||||
if this.LayoutFromUser == "" {
|
||||
if this.LayoutFromUser == "" || this.LayoutFromUser != other.LayoutFromTemplate {
|
||||
if other.LayoutFromTemplate != this.LayoutFromTemplate {
|
||||
return w
|
||||
}
|
||||
} else if isLayoutStandard(this.LayoutFromUser) {
|
||||
if other.LayoutFromTemplate != this.LayoutFromUser {
|
||||
return w
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user