[Item] metadata for CS #225
windingwind
started this conversation in
Note Templates
Replies: 3 comments
-
Extra Metadata Fields:Item Link. Click to open the PDF attachment. <tr>
<th style="background-color:#f3faf4;">
<p style="text-align: right">PDF Attachment</p>
</th>
<td style="background-color:#f3faf4;">
<p>${((topItem) => {
const getPDFLink = (_item) => {
let libraryID = _item.libraryID;
let library = Zotero.Libraries.get(libraryID);
let itemKey = _item.key;
let itemLink = "";
if (library.libraryType === "user") {
itemLink = `zotero://open-pdf/library/items/${itemKey}`;
} else if (library.libraryType === "group") {
itemLink = `zotero://open-pdf/groups/${library.id}/items/${itemKey}`;
}
return `<a href="${itemLink}">${_item.getFilename()}</a>`;
};
return Zotero.Items.get(topItem.getAttachments())
.filter((i) => i.isPDFAttachment())
.map((i) => getPDFLink(i))
.join("\n");
})(topItem)
}</p>
</td>
</tr> |
Beta Was this translation helpful? Give feedback.
0 replies
-
fix a bug to fetch "citation key"
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Is it possible to make it so that if I click on the title of it, it will take me to the item in my Zotero library (not the pdf)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Modified on template #223 . Auto-adjust metadata according to item type.
Beta Was this translation helpful? Give feedback.
All reactions