Alinea’s link and media fields create typed references between content entries and the files stored in your media library. Unlike raw string foreign keys, each link field returns a fully resolved object — with the linked entry’s title, URL, and any extra fields you configure. All link type definitions are exported fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alineacms/alinea/llms.txt
Use this file to discover all available pages before exploring further.
alinea.
Imports
At query time, Alinea resolves all references automatically. The raw stored value is an
EntryReference or UrlReference object, but the query layer replaces it with the fully populated typed object described in this page. Import EntryReference and UrlReference from alinea if you need to work with the raw reference shape.Field.entry
Field.entry links to another content entry in your workspace. The resolved value is an EntryLink object containing the linked entry’s entryId, entryType, title, path, and href.
Using Field.entry
EntryLink type shape:
EntryLink type
Attaching extra fields
Pass afields object to collect additional data at the time the link is created (for example, a custom label for the link):
Entry link with extra fields
Multiple entry links
UseField.entry.multiple to allow selecting more than one entry:
Multiple entry links
A filter object that limits which entries can be selected. For example,
{_type: 'Article'} restricts the picker to entries of that type.Restricts the entry picker to a specific workspace and root. Useful for multi-workspace setups.
When
true, only direct children of the currently edited entry are shown in the picker.Additional fields collected alongside the link reference. The data is stored inside the
fields property of the resolved EntryLink.Instructional text below the field label.
Compact, borderless rendering of the link field.
Fractional form width (0–1).
Field.image
Field.image opens the media library filtered to image files. The resolved value is an ImageLink object with image-specific metadata such as dimensions, average colour, and thumb hash for blur placeholders.
Using Field.image
ImageLink type shape:
ImageLink type
Field.image.multiple to allow multiple image selections. The result is an array of ImageLink objects.
Instructional text displayed below the label.
Extra fields attached to each image selection (e.g. an alt-text field).
Compact, borderless rendering of the image picker.
Fractional form width (0–1).
Field.file
Field.file opens the media library filtered to non-image files. The resolved value is a FileLink object with the file’s title, href, extension, and byte size.
Using Field.file
FileLink type shape:
FileLink type
Instructional text below the label.
Extra fields attached to each file selection.
Compact, borderless rendering of the file picker.
Fractional form width (0–1).
Field.link
Field.link is a polymorphic field: it allows the editor to pick either an internal entry, an external URL, or a file from the media library. The resolved value is the union type Link<Fields>, which is EntryLink | UrlLink | FileLink.
Using Field.link
Link type:
Link union type
_type field ("entry" | "url" | "file") when you need to handle each variant differently.
Extra fields collected for every link variant (entry, URL, or file).
Restricts which entries appear in the entry picker pane of the link dialog.
When
true, only direct children of the currently edited entry are shown in the entry picker pane.Instructional text below the label.
Compact, borderless rendering of the link field.
Fractional form width (0–1).
Field.url
Field.url provides a URL input backed by the URL picker dialog. The editor can paste a URL or open a dialog to select and configure it. The resolved value is a UrlLink object.
Using Field.url
UrlLink type shape:
UrlLink type
Field.url.multiple to allow multiple URL entries.
Instructional text below the label.
Extra fields attached to each URL entry.
Compact, borderless rendering of the URL field.
Fractional form width (0–1).
Full example
Link fields combined in one type