Link custom field
You use the Link custom field to set links in your site to make it easy for your audience to redirect to related content. It displays a link selector that allows you to insert links to existing pages or content items from Sitefinity CMS, enter an external link (URL) or email address, which you want to link the current item to.
The Link custom field is available for both static and dynamic content types and can be single-select or multi-select type.
When linking to a particular content type, Sitefinity CMS uses dynamic links, so that in case you move the News widget, for example, the link to the news item still redirects to the proper content.
To add a Link custom field, perform the following:
- Perform procedure Create custom fields » Step 1 to Step 5.
- In Type dropdown box, select Link.
- Enter a name for the field.
The name of the field is different from its label. The field's name serves as a reference for that field in the backend. No spaces are allowed.
- In Interface widget for selecting items dropdown box, select Link selector.
- In Label field, enter a label of the link selector.
This is a label of the interface widget for selecting items.
- (Optional) In Instructional text field, enter any instructional or explanatory text, or examples for the link selector field, if needed.
The instructional text is displayed as a tooltip next to the field label in the backend.
- Select the This field is required checkbox, if you want to make the custom field mandatory.
- Select the Multiple links can be selected checkbox to enable content editors to insert links of multi-select type.
Note that when the checkbox is not selected, this limits the link selection to a single-select type.
- Click Done.
The new field appears in the Custom fields section.
If you want to delete a custom field, click
.
- Save your changes.
- For MVC widgets: When using MVC widget templates, you need to implement a front-end rendering for this custom field to override the interface widget for this type of field.