Configuring grouped page attachments
If you want files to be associated with a particular page, there are several types of page attachments:
- unsorted attachments added to pages on the Properties -> Attachments tab
- attachments added by uploading files into fields defined for a page type, using one of the following data types:
- Attachments – stores multiple attachments under a single page type field
- File – stores a single page attachment
Grouped page attachments are a suitable for situations when you want to separate attachments into multiple different groups. First, create attachment fields in the related page type and then develop content that displays the attachment files on your website.
Creating attachment fields
- Open the Page types application.
- Create a new page type, or Edit () an existing one.
- If you are creating a new page type, stop on the Fields step of the wizard. If you are editing an existing page type, switch to the Fields tab.
- Click New field.
- Type a Field name.
- In Data type, select Attachments.
- The system then automatically selects Attachments as the Form control.
- Type a Field caption. This is the label of the field.
- Click Save.
- (Optional) Repeat steps 4–8 to add any number of attachment fields.
- If you are creating a new page type, finish the creating process.
The system saves the fields.
The attachment fields are available when editing pages of the specified page type on the Content tab. See Attaching file groups to pages.
Do not forget that the website’s developers need to implement code that displays or otherwise uses the uploaded attachments. See Displaying page attachments.
Reference – Editing control settings for Attachments fields
When you edit a specific page type in the Page type application, select a specific field on the Fields tab. If you select Attachments as the Field type, the system automatically selects Attachments as the Form control, and the Editing control settings category appears. All options from the category are described in the following reference.
Some of the options are displayed only after you click Advanced.
Name | Description |
Allow change order | If selected, the order of attachments can be changed. |
Paging | If selected, paging is used for the list of attachments. |
Page size | Define the page size options that are selectable in the attachments paging. Values must be separated by commas. For example, 25,50,100,##ALL## where ##ALL## means an option for displaying all attachments on one page. Page size is valid only when Paging is selected. |
Default page size | Define the amount of attachments displayed per page by default. Default page size is valid only when Paging is selected. |
Allowed extensions | Define which file extensions are allowed to be uploaded as attachments. Select Inherit from settings to use the values specified in Settings -> System -> Files. Clear Inherit from settings to set own file extensions separated by semicolons, e.g., jpg;gif;png. |
Automatic image resize on upload | |
Resize | Define whether the system resizes uploaded images or not. Select:
|
Width (px) | Images will be resized so that width matches the entered value. The aspect ratio will not be kept. Width (px) is enabled only when you select (use custom settings) in Resize. |
Height (px) | Images will be resized so that height matches the entered value. The aspect ratio will not be kept. Height (px) is enabled only when you select (use custom settings) in Resize. |
Max side size (px) | If one of the sides of the image is larger than this value, the image will be resized so that the larger side matches the entered value. The aspect ratio is kept, and Width (px) and Height (px) are not applied. Max side size (px) is enabled only when you select (use custom settings) in Resize. |