mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Add database template field var https://github.com/siyuan-note/siyuan/issues/12968
This commit is contained in:
@@ -509,6 +509,16 @@ func RenderTemplateCol(ial map[string]string, rowValues []*av.KeyValues, tplCont
|
||||
}
|
||||
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 {
|
||||
dataModel[rowValue.Key.Name] = v.String(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user