08-13-2022 02:28 AM
Project Alfresco Content Application
I'm trying to extend Content Metadata Card with custom groups and can't make property readonly.
The changers of app.config.json file by documentation do not work,
and changers of app.extensions.json file by forum thread do not works too.
app.extensions.json:
"content-metadata-presets": [ { "id": "app.content.metadata.custom", "custom": [ { "id": "app.content.metadata.customSetting", "includeAll": true, "readOnlyProperties": [ "myprefix:category", "myprefix:family", "myprefix:natura" ], "exclude": [ "rn:renditioned", "cm:versionable", ...
app.config.json
"content-metadata": { "presets": { "custom": [ { "includeAll": true, "readOnlyProperties": [ "myprefix:family", "myprefix:natura" ], "exclude": [ "rn:renditioned", ...
To be honest, I tried place readOnlyProperties in every thread of custom preset in both files and separately.
What can I do?
08-23-2022 07:23 AM
The "readOnlyProperties" did not work for me.
So I did workaround by using "editable": false parameter. Now group contains two items with same aspect. First item is editable, second item isn't.
... "content-metadata-presets": [ { "id": "app.content.metadata.custom", "custom": [ { "title": "TRANSLATABLE_TITLE_FOR_GROUP_1", "items": [ { "id": "", "aspect": "myprefix:aspect", "properties": [ "myprefix:myEditableProperty1", "myprefix:myEditableProperty2" ] }, { "aspect": "myprefix:aspect", "properties": [ "myprefix:category", "myprefix:family", "myprefix:natura" ], "editable": false } ] } ] } ] ...
08-16-2022 06:55 AM
Did you follow these steps?
https://alfresco-content-app.netlify.app/#/tutorials/content-metadata
08-22-2022 06:34 AM
Angel thanks for respond!
Yes I did it. Everything from tutorial works fine: creating group, includeAll, exclude, create list of properties from several asspects.
But there is nothing about readonly in the tutorial. Now I hide properties. But I want to show their values in read only mode.
08-23-2022 07:23 AM
The "readOnlyProperties" did not work for me.
So I did workaround by using "editable": false parameter. Now group contains two items with same aspect. First item is editable, second item isn't.
... "content-metadata-presets": [ { "id": "app.content.metadata.custom", "custom": [ { "title": "TRANSLATABLE_TITLE_FOR_GROUP_1", "items": [ { "id": "", "aspect": "myprefix:aspect", "properties": [ "myprefix:myEditableProperty1", "myprefix:myEditableProperty2" ] }, { "aspect": "myprefix:aspect", "properties": [ "myprefix:category", "myprefix:family", "myprefix:natura" ], "editable": false } ] } ] } ] ...
Explore our Alfresco products with the links below. Use labels to filter content by product module.