mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 15:04:07 +01:00
🎨 Database template column support using values from other columns https://github.com/siyuan-note/siyuan/issues/9327
This commit is contained in:
parent
558422c407
commit
7556d1c3a2
1 changed files with 3 additions and 0 deletions
|
|
@ -54,6 +54,9 @@ func renderTemplateCol(blockID, tplContent string, rowValues []*av.KeyValues) st
|
|||
for k, v := range ial {
|
||||
dataModel[strings.ReplaceAll(k, "custom-", "custom_")] = v
|
||||
}
|
||||
for _, rowValue := range rowValues {
|
||||
dataModel[rowValue.Key.Name] = rowValue.Values[0].String()
|
||||
}
|
||||
if err := tpl.Execute(buf, dataModel); nil != err {
|
||||
logging.LogWarnf("execute template [%s] failed: %s", tplContent, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue