mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 The database template column supports queryBlocks
function https://github.com/siyuan-note/siyuan/issues/10077
This commit is contained in:
parent
20cd2ac696
commit
108bdec5f6
4 changed files with 44 additions and 38 deletions
|
@ -963,8 +963,10 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
|
|||
}
|
||||
|
||||
goTpl := template.New("").Delims(".action{", "}")
|
||||
funcMap := util.BuiltInTemplateFuncs()
|
||||
tpl, tplErr := goTpl.Funcs(funcMap).Parse(tplContent)
|
||||
tplFuncMap := util.BuiltInTemplateFuncs()
|
||||
// 这里存在依赖问题所以不支持 SQLTemplateFuncs(&tplFuncMap)
|
||||
goTpl = goTpl.Funcs(tplFuncMap)
|
||||
tpl, tplErr := goTpl.Funcs(tplFuncMap).Parse(tplContent)
|
||||
if nil != tplErr {
|
||||
logging.LogWarnf("parse template [%s] failed: %s", tplContent, tplErr)
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue