Processing Instruction asset_data#
Upalod templates in media categories use a processing instruction (PI) named asset_data. The<?imperia asset_data?>` PI has various functions, primarily generating specialized input fields or text areas extended for file metadata usage.
For example, an input field to enter the file title:
<?imperia asset_data
name: title
label: Titel
source: *:headline,*:title,EXIF:XPTitle,IPTC:ObjectName
hint: Unter diesem Titel finden Sie das Bild im CMS wieder
required: 0
set: EXIF:XPTitle,IPTC:ObjectName
?>
The source option searches the specified field names in different metadata formats, such as EXIF, XMP, or IPTC, and provides the results to the input field. The syntax *:fieldname means that all available metadata formats are searched. Alternatively, you can explicitly specify a format (e.g., iptc:fieldname).
The table below provides a description of the available options:
| Option | Description | Example |
|---|---|---|
| source | Retrieves the metadata list and makes the results available to the input field. | source: IPTC:ObjectName |
| name | Specifies the meta-info variable where the entered value will be stored. | name: title |
| label | Specifies the label of the input field or textarea. | label: Titel |
| hint | Specifies the help text displayed below the input field or textarea. | hint: Unter diesem Namen finden Sie diese Datei im CMS |
| no_autofill | Prevents automatic prefilling of content from image metadata. | no_autofill: 1 |
| set | Writes the input values back to the asset metadata using this parameter. | set: EXIF:XPTitle |
| required | Determines whether the field must be filled out to complete the upload. | required:1 |