Load Frontmatter variables from other files? #759
-
Now that I have a fairly long frontmatter driven setup going, I'd like to use it in more templates without having to modify oodles of files each time I change the function. I'm trying to figure out how to load variable contents from other files, mainly stored functions. But to no avail. I mean, I can't even read them from within the file. ---
test: hello
---
'''dataviewjs
dv.span(this.test);
'''
(Using a fake ticks inline so it shows up) Doesn't seem to do anything. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
DataviewJS does not use 'this' - if you want metadata for the current file, use |
Beta Was this translation helpful? Give feedback.
DataviewJS does not use 'this' - if you want metadata for the current file, use
dv.current()
. If you want metadata from other files, usedv.page("path/to/path")
.