🎨 The database template column supports queryBlocks function https://github.com/siyuan-note/siyuan/issues/10077

This commit is contained in:
Daniel 2024-01-04 22:04:29 +08:00
parent 9b6cb211ab
commit 20cd2ac696
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 31 additions and 28 deletions

View file

@ -962,8 +962,8 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
ial["updated"] = time.UnixMilli(block.Block.Updated).Format("20060102150405")
}
funcMap := util.BuiltInTemplateFuncs()
goTpl := template.New("").Delims(".action{", "}")
funcMap := util.BuiltInTemplateFuncs()
tpl, tplErr := goTpl.Funcs(funcMap).Parse(tplContent)
if nil != tplErr {
logging.LogWarnf("parse template [%s] failed: %s", tplContent, tplErr)