🎨 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:31:42 +08:00
parent 20cd2ac696
commit 108bdec5f6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 44 additions and 38 deletions

View file

@ -604,7 +604,9 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
}
goTpl := template.New("").Delims(".action{", "}")
goTpl = goTpl.Funcs(util.BuiltInTemplateFuncs())
tplFuncMap := util.BuiltInTemplateFuncs()
SQLTemplateFuncs(&tplFuncMap)
goTpl = goTpl.Funcs(tplFuncMap)
tpl, tplErr := goTpl.Parse(tplContent)
if nil != tplErr {
logging.LogWarnf("parse template [%s] failed: %s", tplContent, tplErr)