Link

The link field can be used to create one or multiple references to other entries or an external resources (like a webpage or an email address). By default the user can choose between internal pages, external urls or uploaded files. If you want to limit to selection to just one of those options it's possible to declare the field as either an Entry field, Url field, File field, or Image field.

import {Field} from 'alinea'

Field.link('Single link')

Field.link.multiple('Multiple links')

Configuration

max

Limit the amount of rows in case of multiple links.

fields

A Type that defines extra fields added to every chosen link. For example adding an alt field to images:

import {Config, Field} from 'alinea'

Field.image('Pick an image', {
  fields: Config.type({
    fields: {alt: Field.text('Alt description')}
  })
})