Managing assets
Configuring the filename field
In the default configuration, the dialog does not have a field for renaming the filename of the asset.
You can add the field to the dialog by hotfixing the configuration of the dialog.
In the Resource Files app:
-
Open the
/dam-app-jcr/dialogs/uploadAndEdit.yaml
configuration file for editing. -
In the
jcrDetail
part, add thejcr:content:
property shown below to the intended position of the filename field, for example just below the mediaupload
field property. -
Save the updated configuration.
form:
properties:
upload:
factoryClass: info.magnolia.dam.app.field.factory.DamUploadFieldFactory
class: info.magnolia.ui.editor.UploadViewDefinition
required: true
itemProvider:
$type: jcrChildNodeProvider
nodeName: jcr:content
nodeType: mgnl:resource
jcr:content:
$type: compositeField
itemProvider:
$type: jcrChildNodeProvider
properties:
fileName:
$type: textField
label: ""
label: Filename
Afterwards, to bring the modified configuration to life, open /dam-app-core/apps/dam.yaml
for editing and save it without changes.
You can touch any decoration that is part of the Dam app so that the included file changes would be picked up. |
In a similar way, you can also modify the configuration of the Asset (node) rename dialog (/dam-app-jcr/dialogs/rename.yaml
) to enable the filename field there as well: