You’re reading the ZotLit v2 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.

Note and content templates

The zt root for the note template: every item field plus the runtime-computed fields assembled at the app layer (backlinks, resolved attachment links, flattened annotations, author conveniences).

The note template (zotlit-note.liquid.md) and the content template (zotlit-content.liquid.md) share this context.

Prop

Type

Annotation template

The zt root of the annotation template: one annotation (TemplateAnnotation) plus citation. Entries of zt.annotations on the note root carry no citation — only the single-annotation render resolves one.

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

Prop

Type

Filename template

The zt root of the filename template: an item's own fields, its collections, Primary Creators, an Author Summary, and inert notePath / noteLink stubs. It reads only this item when naming a note.

The filename template (zotlit-filename.liquid.md) receives exactly the properties below.

Prop

Type

Item fields

Every Zotero item field is a flat property on zt. The canonical Zotero field name is the primary accessor, and type-specific spellings normalize to their canonical base field: reach blogTitle as zt.publicationTitle and studio as zt.publisher. The type-specific spelling itself is not on zt.

Three fields carry CSL-inspired renames. Both the rename and the Zotero canonical name work:

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

Fields by item type

Each Zotero item type exposes its own field set. Expand a type to see the zt property names it adds to the common fields above.

Prop

Type

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.extraItemExtra | null

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

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.

Annotation entries

One annotation with its app-layer links resolved: an entry of zt.annotations on the note root, and the base of the single-annotation root AnnotationTemplateContext.

Loop over them with {% for annotation in zt.annotations %}.

Prop

Type

Annotation types

A resolved annotation type name: one Zotero declares, or "unknown" for a type id Zotero added after this mapping was written.

  • "highlight": Text marked with a highlight color.
  • "note": A note pinned to a spot on the page.
  • "image": A rectangular area selection, saved with an excerpt image.
  • "ink": A freehand drawing, saved with an excerpt image.
  • "underline": Underlined text.
  • "text": Free text typed onto the page.
  • "unknown": A type id Zotero added after this mapping was written.

Parent item

Parent literature item as seen from the standalone annotation template. The annot-view drag-insert resolves the item's tags but omits collection rows entirely — collections lives only on the note root. Read them there (zt.collections).

Prop

Type

Creators

One creator of an item, in the template vocabulary. Coerces to fullName in string contexts.

zt.creators lists every creator on the item. zt.authors lists the creators in the first populated role: the item's primary creator role, editor, director, then contributor. Institutional creators (Zotero fieldMode=1) set literal and leave family and given empty.

Prop

Type

Tags

A Tag in the template vocabulary. Coerces to name in string contexts (like a collection coerces to its name), so {{ zt.tags | join: ", " }} renders tag names directly. Zotero-internal IDs are dropped; type is the resolved name rather than Zotero's raw int.

Prop

Type

Collections

A Zotero collection an item belongs to, in the template vocabulary. Coerces to name in string contexts (like a tag coerces to its name).

Use the collection_paths filter to render the full ancestor path joined by a separator ("/" by default).

Prop

Type

Date format

zt.date is one of four parsed variants, discriminated by kind. {{ zt.date }} renders an ISO date for "date", an ISO year-month for "yearMonth", a bare year for "year", and the raw user text for "text". Use {{ zt.date | date: "%Y-%m-%d" }} for explicit formatting with strftime tokens; a "text" date renders its raw text unchanged whatever the format string.

Full date

Full Y/M/D date parsed into a Temporal.PlainDate.

Prop

Type

Year and month

Year and month only; Temporal.PlainYearMonth (no day).

Prop

Type

Year only

Year only. Also covers Zotero's 01 2003 misparse where the user-string day is meaningful but month is missing (the spurious day is dropped since no Temporal type fits "year + day without month").

Prop

Type

Text

Unparseable / text-only: the year is missing or the SQL prefix is absent.

Prop

Type

Extra field

Best-effort structured view of Zotero's extra field. Plain data so it is directly indexable in Liquid, Eta, and JS.

toString is non-enumerable, so a spread, JSON.stringify, or Object.keys sees the three data properties alone.

zt.extra is a parsed view of Zotero's free-text Extra field, or null when the field is empty. {{ zt.extra }} renders the raw field text.

Prop

Type

Extra lines

One source row of an Extra field, in document order: a parsed pair (key plus trimmed value) or a non-pair text/blank row (key: null). raw is the verbatim line so interleaved prose is never dropped.

A line splits on its first : or =, and is a pair only when the key starts with an ASCII letter and otherwise holds ASCII letters, digits, spaces, dots, hyphens, or underscores. A line that does not match, and one whose value is empty, becomes a text row.

A non-enumerable toString returns raw, as on the extra field itself.

Each entry of zt.extra.lines.

Pair row

Prop

Type

Text row

Prop

Type

Attachments

Attachment data in the v2 template vocabulary. Exposed on zt.attachments and as parentAttachment on each annotation.

Prop

Type

A single entry in relatedItems: the related item's own fields, flattened with its backlink and author conveniences. Depth-1 — its own annotations, attachments, and relatedItems are deliberately absent (resolving them would require a per-related-item DB fan-out), marking the boundary of the relation graph.

Each entry also carries every item field.

Prop

Type

Notes

A child note exposed on notes as a link only — the imported note's Markdown body lives in its own file, never inlined here. Carries a non-enumerable toString rendering its title (falling back to key), so it stringifies to a title in string contexts and previews.

See Import Zotero notes for the import workflow.

Prop

Type

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 includes the group library identifier (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