PKM-er / obsidian-zotlit

A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.
https://zotlit.aidenlx.top
MIT License
589 stars 25 forks source link

Is it possible to access information about the file in a template? #289

Open DennisFriedl opened 6 months ago

DennisFriedl commented 6 months ago

I would like to access the file name of the Obsidian note an annotation is added to.

Something like this:

<% if (tp.file.title == it.docItem.citekey) { %>
BEHAVE ONE WAY WHEN ANNOTATION IS ADDED TO ASSOCIATED LITERATURE NOTE
<% } %>
<% else { %>
BEHAVE ANOTHER WAY WHEN ANNOTATION IS ADDED TO ANY OTHER TYPE OF NOTE
<% } %>

The reason for this is that I want to design my annotations differently when I add them to the literature note of the item they are associated with (they should display detailed information then) versus any other note (the annotations should be as minimalistic and slim as possible then).

Is that possible?