mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 Add database template field var https://github.com/siyuan-note/siyuan/issues/12968
This commit is contained in:
parent
7c6ff6b55f
commit
e0fbe180bb
1 changed files with 10 additions and 0 deletions
|
|
@ -509,6 +509,16 @@ func RenderTemplateCol(ial map[string]string, rowValues []*av.KeyValues, tplCont
|
||||||
}
|
}
|
||||||
dataModel[rowValue.Key.Name] = contents
|
dataModel[rowValue.Key.Name] = contents
|
||||||
}
|
}
|
||||||
|
} else if av.KeyTypeBlock == v.Type {
|
||||||
|
dataModel[rowValue.Key.Name+"_created"] = time.Now()
|
||||||
|
if nil != v.Block {
|
||||||
|
dataModel["entryCreated"] = time.UnixMilli(v.Block.Created)
|
||||||
|
}
|
||||||
|
dataModel["entryUpdated"] = time.Now()
|
||||||
|
if nil != v.Block {
|
||||||
|
dataModel["entryUpdated"] = time.UnixMilli(v.Block.Updated)
|
||||||
|
}
|
||||||
|
dataModel[rowValue.Key.Name] = v.String(true)
|
||||||
} else {
|
} else {
|
||||||
dataModel[rowValue.Key.Name] = v.String(true)
|
dataModel[rowValue.Key.Name] = v.String(true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue