fixed navname ignored in addSubNode
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
daed37587e
commit
93ea8b8b1b
@ -112,11 +112,6 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx
|
|||||||
newNode.root = node.root
|
newNode.root = node.root
|
||||||
|
|
||||||
newPathConfig := new(PathConfig)
|
newPathConfig := new(PathConfig)
|
||||||
if navname != "" {
|
|
||||||
newPathConfig.This = ThisPathConfig{
|
|
||||||
Navname: &navname,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if dataMapKey != "" {
|
if dataMapKey != "" {
|
||||||
if newPathConfig.Data == nil {
|
if newPathConfig.Data == nil {
|
||||||
newPathConfig.Data = make(helper.MapString)
|
newPathConfig.Data = make(helper.MapString)
|
||||||
@ -147,6 +142,10 @@ func (node *TreeNode) addSubNode(tplFilename, subDir string, navname string, ctx
|
|||||||
subDir,
|
subDir,
|
||||||
mergedConfig,
|
mergedConfig,
|
||||||
)
|
)
|
||||||
|
if navname != "" {
|
||||||
|
// set after fillConfig, because it is ignored in fillConfig
|
||||||
|
newNode.Config.This.Navname = &navname
|
||||||
|
}
|
||||||
|
|
||||||
// fake via normal file behavior
|
// fake via normal file behavior
|
||||||
newNode.Config.Template = &tplFilename
|
newNode.Config.Template = &tplFilename
|
||||||
|
Loading…
Reference in New Issue
Block a user