Skip to content

url

Custom field type

All field types

A link, either to something in the CMS or to an address you type.

Written as
"Type": "url"
Valid on
Template fields, Datastore schema, and custom site settings
Stores
{{ url }} — the Liquid object a template reads from this field.
Validators
same, not, eq, different
Default value
A URL string, the compact Entity|Type:Name|URL form, or an object carrying UrlType, ReferenceGUID, and Url.

Properties

Accepted in addition to the shared properties every definition carries.

Property Required Description
AllowedTypes — Restricts which kinds of link the editor may choose. Empty allows all.
DoNotValidateCustom — Skips URL syntax checking on a hand-entered address.

Notes

An editor chooses the kind of link from a dropdown: an entity such as a page, an image, a document, a custom address, an email address, a phone number, JavaScript, or no link at all. AllowedTypes limits which kinds are offered.

A link to a CMS object saves that object's URL at the moment the link is saved. If the object's URL changes later, links already saved elsewhere keep the old URL until they are edited and saved again, so after changing an entity's URL check the url fields and menu items that point to it. A menu item's Link field works the same way.