mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
allow nested params when using Pages.GroupByParam and Pages.GroupByParamDate
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
be643580dd
commit
51f09b17fd
@@ -14,6 +14,7 @@
|
||||
package resource
|
||||
|
||||
import (
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -36,9 +37,9 @@ func GetParamToLower(r Resource, key string) any {
|
||||
}
|
||||
|
||||
func getParam(r Resource, key string, stringToLower bool) any {
|
||||
v := r.Params()[strings.ToLower(key)]
|
||||
v, err := maps.GetNestedParam(key, ".", r.Params())
|
||||
|
||||
if v == nil {
|
||||
if v == nil || err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user