Hide default properties and show aspect properties on Share
-
21-12-2019 - |
Question
I'm stuck and I cannot figure out why can achieve this. I'm new to Alfresco, so maybe I'm doing it in a wrong way.
I'm trying to hide default properties on Alfresco Share and only show fields of one of my custom aspects. I mean I want to hide cm:title, cm:name etc.
I'm trying to carry out this by customizing share-config-custom.xml
. If I only use <hide>
with default properties (without adding custom fields) these are correctly hidden. If I use <show>
with my custom properties, both, custom properties and default properties are shown. But the problem is that if I add <hide>
and <show>
fields, only default fields are shown, although they are seted as hidden.
Here is an example XML:
<config evaluator="node-type" condition="cm:content">
<forms>
<form>
<field-visibility>
<hide id="cm:title" />
<hide id="cm:description" />
<show id="custom:DocumentClass" />
<show id="custom:DocumentDate" />
</field-visibility>
</form>
</forms>
</config>
Thaks in advance.
Solution
You can try the following:
- Use the hide fields on the cm:content type
- Add an extra config and instead of the
evaluator="node-type"
make itevaluator="aspect"
- Add your custom aspect in the new config you just created
If the above doesn't work, try adding replace=true
flag to the cm:content config