Allowing users to insert links to media on the Form tab
You can use the Media selection form control to allow users to select files on the Form tab of a page. Users can then select any file from any source—Pageattachments, Content tree and Media libraries—to insert a link into pagesthat they are editing.
To insert the media selection form control
- Open the Page types application.
- Edit () the page type into which you want to add the Media selection form control.
- Switch to the Fields tab.
- Add a new field using New field.
- Fill in the properties of the new field as follows:
- Field type: Standard field
- Field name: MediaSelection
- Data type: Text
- Size: 300
- Field caption: Media selection (for example)
- Field description: any description that you want users to see when hovering over the field caption
- Form control: Media selection (select via the (more items…) option)
- In Editing control settings, specify resizing options for images uploaded using this form control.
- Save the form control.
The system creates a new column in the page type’s table – dbo.CONTENT_Doctype. For example, dbo.CONTENT_News for the News page type. When a user inserts a link to a media using the form control, the link is stored in the column.
You can display media links on pages using a transformation in a repeater.