fixed navname ignored in addSubNode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sebastian Frank 2019-06-12 12:59:41 +02:00
parent daed37587e
commit 93ea8b8b1b
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3

View File

@ -112,11 +112,6 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx
newNode.root = node.root
newPathConfig := new(PathConfig)
if navname != "" {
newPathConfig.This = ThisPathConfig{
Navname: &navname,
}
}
if dataMapKey != "" {
if newPathConfig.Data == nil {
newPathConfig.Data = make(helper.MapString)
@ -147,6 +142,10 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx
subDir,
mergedConfig,
)
if navname != "" {
// set after fillConfig, because it is ignored in fillConfig
newNode.Config.This.Navname = &navname
}
// fake via normal file behavior
newNode.Config.Template = &tplFilename