Link Field Reference

This article explains what the Links field is and how to configure it in the Custom Type builder.


The Link field creates web links.

Links vs Content Relationships

The Link Field and the Content Relationship field look similar. The Link Field should be used to create web links, like a CTA. The Content Relationship should be used to create data structures, such as a tagging system or nested nav menu.

JSON model

The following table displays the JSON keys and values of the field’s 'API response.

Edit the JSON model with caution

Only use it to make changes to the Rich Text field labels. Making abrupt changes can cause conflicts when synchronizing changes with your documents.

type 

string (required)

Value must be Link

config  

object

Object for the configuration options

config.label 

string

The label that shows up for the field in the entry editor

config.placeholder 

string

A user-friendly placeholder for the field in the entry editor

config.select 

string

If set to web, it restricts the link to only select a Link to the web

config.allowTargetBlank 

boolean

If set to true, will allow an author to select the Open in a new tab option

Example JSON configuration

The following JSON defines a link to anything (external URL, internal content, or Media Library file.)

Copy
"example_link": {
  "type": "Link",
  "config": {
    "label": "Link to Anything",
    "placeholder": "Link to anything..."
  }
}

API response example

Here is an API response example of a Link field with the API ID of example_link:

Copy
// API response example of a Link field

{
  //...
  "example_link":{
    "link_type":"Web",
    "url":"https://prismicio.io"
  }
}

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.