You’re reading the ZotLit v2 beta docs. Still on v1? Read the v1 docs

ZotLit

Template data

Every property available on the zt variable, organized by template type.

This page lists every property available on zt in each template type. Use the Template Data Explorer against your own library to discover values interactively.

Item fields

All Zotero item fields are available as flat properties on zt. The canonical Zotero field name is the primary accessor. Two fields carry CSL-inspired renames (both the rename and the original work):

PropertyZotero canonicalNotes
zt.abstractabstractNoteBoth zt.abstract and zt.abstractNote work
zt.containerTitlepublicationTitleBoth names work
zt.citekeycitationKeyBoth zt.citekey and zt.citationKey work

Common fields

PropertyTypeDescription
zt.keystringZotero item key (e.g. "ABC12345")
zt.libraryIDnumberLibrary ID
zt.groupIDnumber | nullGroup library ID; null for the personal library
zt.indexedKeystringKEY for the user library, KEYgGROUPID for groups
zt.itemTypestringZotero item type (e.g. "journalArticle", "book")
zt.titlestring | nullItem title
zt.citationKeystring | nullCitation key (Better BibTeX or native)
zt.citekeystring | nullAlias for citationKey
zt.abstractstring | nullAbstract text
zt.containerTitlestring | nullJournal or container title
zt.DOIstring | nullDigital Object Identifier
zt.urlstring | nullURL
zt.volumestring | nullVolume
zt.issuestring | nullIssue
zt.pagesstring | nullPages
zt.dateItemDate | nullPublication date (parsed; see Date format)
zt.publisherstring | nullPublisher
zt.placestring | nullPlace of publication
zt.editionstring | nullEdition
zt.ISBNstring | nullISBN
zt.ISSNstring | nullISSN
zt.languagestring | nullLanguage
zt.shortTitlestring | nullShort title
zt.extraItemExtra | nullParsed Extra field (see Extra field)
zt.dateAddedTemporal.InstantWhen the item was added to Zotero. Renders as the local date (e.g. 2026-06-21) in {{ }} output
zt.dateModifiedTemporal.InstantWhen the item was last modified. Renders as the local date in {{ }} output

Item-type-specific fields (e.g. zt.reportNumber, zt.thesisType, zt.conferenceName) are available by their Zotero canonical name. Type-specific aliases are normalized to the canonical base field: access them through the base name (e.g. blogTitle becomes zt.publicationTitle, studio becomes zt.publisher). The type-specific spelling is not available on zt.

Timestamp precision

Timestamp fields (zt.dateAdded, zt.dateModified) are second-precision. Zotero stores them as UTC strings with no sub-second component.

Note and content templates

The note template (zotlit-note.liquid.md) and the content template (zotlit-content.liquid.md) share the same zt context. All item fields above are available, plus the following:

PropertyTypeDescription
zt.backlinkstringZotero deep link (zotero://select/...)
zt.annotationsarrayAll annotations across all attachments (see Annotation template)
zt.attachmentsarrayAll attachments (see Attachments)
zt.authorsarrayCreators filtered to the item's primary creator type. All creators when none matches. Coerce to fullName in string contexts
zt.authorsShortstringFormatted short author string (e.g. "Smith et al.")
zt.relatedItemsarrayItems from Zotero's Related panel, sorted by title (see Related items)
zt.notesarrayChild notes from Zotero (see Notes)
zt.collectionsarrayZotero collections this item belongs to, sorted by name (see Collections)
zt.notePathstring | nullFull vault-relative literature note path (including .md); null when unresolvable
zt.noteLinklink propertyWiki-link to this item's literature note. Renders on plain access; pipe through note_link to override alias or subpath

Filename template

The filename template (zotlit-filename.liquid.md) receives item-level fields only. The richer context assembled for the note body is not available.

Available: all item fields, plus zt.creators, zt.tags, and zt.collections.

Not available: zt.backlink, zt.annotations, zt.attachments, zt.relatedItems, zt.authors, zt.authorsShort, zt.notes.

zt.notePath and zt.noteLink exist but always resolve empty, because a note has no path until it is named.

Annotation template

The annotation template (zotlit-annotation.liquid.md) receives a single annotation as zt.

PropertyTypeDescription
zt.keystringAnnotation item key
zt.libraryIDnumberLibrary ID
zt.typestring"highlight", "note", "image", "ink", "underline", or "text"
zt.textstring | nullHighlighted or annotation text
zt.commentstring | nullUser comment, converted to Markdown; null when absent
zt.commentHtmlstring | nullRaw comment HTML as stored by Zotero; null when absent
zt.colorHexstring | nullHex color (e.g. "#ffd400")
zt.colorNamestring | nullPalette name: "yellow", "red", "green", "blue", "purple", "magenta", "orange", "gray", or "plum"; null for custom colors outside the palette
zt.pageLabelstring | nullPage label as shown in the document (e.g. "42", "iv")
zt.pagenumber | null1-based page number from the PDF position; null for EPUB/snapshot annotations
zt.tagsarrayTags on this annotation (same shape as Tags)
zt.authorNamestring | nullAnnotation author
zt.isExternalbooleanWhether the annotation is external
zt.dateAddedTemporal.InstantWhen the annotation was created
zt.dateModifiedTemporal.InstantWhen the annotation was last modified
zt.imgLinklink propertyWiki-link to the excerpt image. Pipe through embed for an Obsidian embed. Resolves empty for annotations without an image
zt.fileLinklink propertyWiki-link to the parent attachment, anchored to this annotation's page
zt.backlinkstringZotero deep link to this annotation
zt.parentItemobject | nullThe parent literature item (all item fields). null for annotations on standalone attachments. parentItem.collections is populated when the annotation renders as part of a note; in standalone renders (annotation view drag/insert, note import) collections are absent; read them via zt.collections on the note context instead
zt.parentAttachmentobjectThe parent attachment (see Attachments)
zt.citationstring | nullPage-pinned citation rendered through your cite template with the annotation's pageLabel as locator. null when there is no parent item or no citation key

Citation templates

Both citation templates (zotlit-cite.liquid.md and zotlit-cite2.liquid.md) receive the same zt object with two parallel arrays:

PropertyTypeDescription
zt.citationsarrayCitation items: each pairs the cited item with citation-scoped properties
zt.itemsarrayThe same cited items bare. zt.items[i] is zt.citations[i].item

Citation item

Each entry in zt.citations:

PropertyTypeDescription
itemobjectThe cited item's data (see Cited item fields). Never null: unresolved references become a stub with every field null
locatorstring | nullPinpoint reference (e.g. "62"); null when absent
labelstring | nullCSL locator label (e.g. "page", "chapter"); null when absent
labelShortstringPandoc abbreviation of the label (e.g. "p.", "chap."). Absent or unrecognized labels (including "page") yield "p."
suppressAuthorbooleanWhether the author is suppressed; default false
prefixstring | nullText before the citation
suffixstring | nullText after the citation

Cited item fields

A cited item uses the same field vocabulary as the note template, narrowed to fields both a live Zotero item and an embedded-data snapshot can supply:

PropertyType
item.itemTypestring | null
item.titlestring | null
item.creatorsarray (see Creators)
item.primaryCreatorTypestring | null
item.dateItemDate | null
item.citationKeystring | null
item.citekeystring | null
item.abstractstring | null
item.containerTitlestring | null
item.shortTitlestring | null
item.DOIstring | null
item.urlstring | null
item.ISBNstring | null
item.ISSNstring | null
item.volumestring | null
item.issuestring | null
item.pagesstring | null
item.publisherstring | null
item.placestring | null
item.editionstring | null
item.languagestring | null
item.extrastring | null

Note-tier fields (key, libraryID, indexedKey, tags, dateAdded, dateModified, collections, backlink, annotations, attachments, authors, authorsShort, relatedItems, notes, notePath, noteLink) are not available on cited items.

extra is a raw string here

In the citation context, item.extra is a raw string | null. It is not the parsed ItemExtra object available in note templates.

Locator label abbreviations

labelShort maps the CSL label to its Pandoc locator term. Any label not listed (including "page") yields "p.".

labellabelShort
bookbk.
chapterchap.
columncol.
figurefig.
foliofol.
issueno.
linel.
noten.
opusop.
paragraphpara.
partpt.
sectionsec.
sub-verbos.v.
versev.
volumevol.

Creators

zt.creators is an array of all creators for the item.

PropertyTypeDescription
familystringFamily/last name
givenstringGiven/first name
literalstring | nullSingle-field name (institutional authors); null for personal names
rolestringCreator type: "author", "editor", "translator", etc.
fullNamestringliteral for institutional creators; "given family" for personal names

Institutional creators (Zotero fieldMode=1) set literal and have empty family/given. Creators coerce to fullName in string contexts.

zt.primaryCreatorType (string | null) identifies the primary creator role for this item type (e.g. "author" for journal articles, "director" for films).

Tags

zt.tags is an array of tag objects.

PropertyTypeDescription
namestringTag name
typestring"manual" (user-added), "auto" (added by a Zotero plugin), or "unknown"

Tags coerce to name in string contexts, so {{ zt.tags \| join: ", " }} renders tag names directly.

Collections

zt.collections is an array of the Zotero collections the item belongs to, sorted by name. Trashed collections are excluded.

PropertyTypeDescription
keystringZotero collection key
namestringCollection name
pathreadonly string[]Ancestor chain from root to this collection. path[0] is the top-level ancestor; the last element is this collection

Collections coerce to name in string contexts. Use the collection_paths filter to render the full ancestor path joined by a separator ("/" by default).

Date format

zt.date is a parsed date object with four variants:

kindyearmonthdayvalueString rendering
"date"numbernumber (1-12)numberTemporal.PlainDateISO date (e.g. 2023-06-15)
"yearMonth"numbernumber (1-12)nullTemporal.PlainYearMonthISO year-month (e.g. 2023-06)
"year"numbernullnullnullBare year (e.g. 2023)
"text"number | nullnullnullnullRaw user text (e.g. "submitted")

All variants share uniform accessors:

PropertyTypeDescription
yearnumber | nullNumeric year; extracted from the text when a 4-digit year is present ("text" kind), otherwise null for "text" kind
monthnumber | nullMonth (1-12); available for "date" and "yearMonth"
daynumber | nullDay of month; available for "date" only
valueTemporal.PlainDate | Temporal.PlainYearMonth | nullPrecise temporal value; null for "year" and "text"
rawstringOriginal Zotero string verbatim
kindstringDiscriminator

{{ zt.date }} outputs the string rendering from the table above. Use {{ zt.date \| date: "%Y-%m-%d" }} for explicit formatting with strftime tokens. A "text" date renders its raw text unchanged regardless of the format string.

Extra field

zt.extra is a parsed view of Zotero's free-text Extra field. When empty or absent, zt.extra is null.

PropertyTypeDescription
rawstringOriginal field text verbatim
fieldsobjectFirst value per key (e.g. zt.extra.fields["tex.mendeley-tags"])
linesarrayEvery source row in order

Each entry in lines:

PropertyTypeDescription
rawstringVerbatim source line
keystring | nullParsed key; null for non-pair lines
valuestringParsed value (pair rows only)

Parsing rules: Lines split on the first : or =. A key must start with a letter and contain only letters, digits, spaces, dots, hyphens, and underscores. Lines not matching become text rows (key: null). Empty values produce text rows. fields is first-wins: repeated keys use the first occurrence.

{{ zt.extra }} renders the raw field text (its toString() returns raw).

Attachments

Used in zt.attachments and zt.parentAttachment:

PropertyTypeDescription
keystringAttachment item key
filenamestring | nullFilename; null for URL/unknown links
contentTypestring | nullMIME type (e.g. "application/pdf")
linkModestring"imported_file", "imported_url", "linked_file", "linked_url", "embedded_image", or "unknown"
filePathstring | nullAbsolute on-disk path; null for URL links or unparseable paths
fileLinklink propertyWiki-link to the attachment file. Pipe through file_link to override alias or subpath

zt.relatedItems mirrors Zotero's Related panel, sorted by title. Each entry carries all standard item fields, creators, tags, and aliases, plus:

PropertyTypeDescription
backlinkstringZotero deep link to the related item
authorsarrayPrimary authors
authorsShortstringFormatted short author string
collectionsarrayCollections the related item belongs to
notePathstring | nullVault path to the related item's literature note
noteLinklink propertyWiki-link to the related item's literature note

Related items are depth-1: their own annotations, attachments, and relatedItems are absent.

Notes

zt.notes lists an item's child notes. Each entry is link-only: the note body is not exposed.

PropertyTypeDescription
keystringZotero item key of the child note
titlestring | nullNote title
noteLinklink propertyWiki-link to the imported child-note file. Rendering this property queues the child note for import

Accessing noteLink triggers import: if the link is never rendered, no file is created. Already-imported notes link to the existing file without re-importing. See Import Zotero notes for the import workflow.

Imported note frontmatter

Each imported child-note file carries three frontmatter fields:

FieldDescription
dateWhen the note was added to Zotero. Local datetime with offset at second precision (e.g. 2025-03-15T10:30:00-04:00)
zotero-note-keyIdentity key matching the imported file to the Zotero note. For group libraries, this is the indexed key (KEYgGROUPID)
zotero-lastmodSource note's dateModified timestamp (same format as date). Used by batch re-import to skip unchanged notes

See also

On this page