From 93ea8b8b1bf79f4a267c38a08ee2c297d9211ccb Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Wed, 12 Jun 2019 12:59:41 +0200 Subject: [PATCH] fixed navname ignored in addSubNode --- pkg/mark2web/context.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/mark2web/context.go b/pkg/mark2web/context.go index a795dd1..4a12deb 100644 --- a/pkg/mark2web/context.go +++ b/pkg/mark2web/context.go @@ -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