Hello,
unfortunately, I’m not making progress with my problem and I don’t know enough about it. That’s why I could use your knowledge.
What I’m trying to do
I’m trying to convert a DataView list with linked notes into internal links using Templater.
For listing in DataView, I’m using the following:
LIST from [[]] and !outgoing([[]])
SORT date DESC
LIMIT 8
With Templater, this list should then be converted into internal links.
Things I have tried
I know that, for example, the following script works for Templater when listing tags:
<%*
const dv = app.plugins.plugins[“dataview”].api;
const query = ‘list From #type/recipe’;
let out = await dv.queryMarkdown(query)
tR += out. Value
%>
I have adapted this script:
<%*
const dv = app.plugins.plugins[“dataview”].api;
const query = 'LIST from [] and !outgoing([]) SORT date DESC LIMIT 8 ';
let out = await dv.queryMarkdown(query)
tR += out. Value
%>
However, it seems to refer to the template itself and not to the note where I apply it. So, it doesn’t display anything.
What do I need to do for Templater to dynamically apply [] to the desired note?
Insert and define tp.file.title in []?
Thank you very much for your help.