Link field (Simplified)
Defines a link field. A link field is intended to contain the URI of some resource you want to make use of in some way. Link fields are most commonly used to contain references to binary objects such as images and media files; all binary objects in content items are referenced in this way.
Note that a content-type
element may only contain one link
field.
Syntax
<field name="NCName" id="NCName"? type="link" > <constraints>...</constraints>? ANY-FOREIGN-ELEMENT* <parameter/>* <relation>...</relation> </field>
Only one form of the constraints
element may be used:
Link constraints.
Examples
This example defines a link field used to contain references to image objects.
<field name="binary" type="link"> <relation>com.escenic.edit-media</relation> <constraints> <mime-type>image/jpeg</mime-type> <mime-type>image/png</mime-type> </constraints> </field>
Attributes
name="
NCName"
-
The name of the
field
element. Note that no twofield
s belonging to the samepanel
may have the same name. id="
NCName"
(optional)-
The id of the
field
element. Set this attribute if you want to be able to reference this element using XInclude. Otherwise it is not required. type="
link"
-
Specifies that this field is a link field.