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?
Solved! Go to Solution.
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 } ] } ] } ] ...
Did you follow these steps?
https://alfresco-content-app.netlify.app/#/tutorials/content-metadata
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.
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 } ] } ] } ] ...
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.