The entry field can be used to link to an internal page.
import {Field} from 'alinea'
Field.entry('Single entry link')
Field.entry.multiple('Multiple entry links')Limit the pages shown in the explorer to this condition. Conditions can be built using fields in the same way as described in the querying content chapter.
_status: "archived" | "draft" | "published"
Filter entries by publication status._type
Filter entries by content type.
import {Field} from 'alinea'
Field.entry('Link to author', {
condition: {
_type: 'Author'
}
})
Field.entry('Link to author or writer', {
condition: {
_type: {
in: ['Author', 'Writer']
}
}
})Preset the UI to show rows or thumbnails (possible values: "row", "thumb")
Show a minimal version of the field. The field label is hidden.
Defines the location (workspace and root) where the explorer will be located.
import {Field} from 'alinea'
Field.entry('Link to author', {
location: {
root: 'pages',
workspace: 'main'
}
})Choose from a flat list of direct children of the currently edited entry.
import {Field} from 'alinea'
Field.entry('Author of this book', {
condition: {
_type: 'Author'
},
pickChildren: true
})Limit the amount of rows in case of multiple links.
import {Field} from 'alinea'
Field.entry.multiple('Select up to 3 authors', {
max: 3
})