Hi Team,
I have 2 custom types in my custom content model, 5 aspects which identifies the content and other 20-30 aspects which have different properties within it which are taken as mandatory aspects inside 5 main aspects.
Here in the system when content will be uploaded, it will have one custom type attached to it and one mainAspect will be attached to it.
Content Types
- custom:contentType1 -1 Aspect from the mainAspect 1, 3 or 4 will be attached
- custom:contentType2 - 1 Aspect from the mainAspect 2 or 5 will be attached
Aspects with properties
- custom:subAspect1
- custom:subAspect2
- custom:subAspect3
- ....
- ..
- custom:subAspect20
Aspects
- custom:mainAspect1 - Mandatory Aspects are custom:subAspect1,custom:subAspect3,custom:subAspect4,custom:subAspect16,custom:subAspect19
- custom:mainAspect2 - Mandatory Aspects are custom:subAspect2,custom:subAspect3,custom:subAspect6,custom:subAspect13,custom:subAspect19
- custom:mainAspect3 - Mandatory Aspects are custom:subAspect1,custom:subAspect5,custom:subAspect8,custom:subAspect10,custom:subAspect13
- custom:mainAspect4 - Mandatory Aspects are custom:subAspect3,custom:subAspect5,custom:subAspect9,custom:subAspect11,custom:subAspect15
- custom:mainAspect5 - Mandatory Aspects are custom:subAspect1,custom:subAspect5,custom:subAspect14,custom:subAspect16,custom:subAspect19
Now I want to make Edit Properties forms in such a way that when I upload one content in the Alfresco and change its type to custom:contentType1 and apply custom:mainAspect3 then only properties associated with subAspects 1,5,18,10,13 should be visible as those aspects are mandatory aspects of custom:mainAspect3.
I have added seperate config files for subAspects in share-config-custom.xml
<config evaluator="aspect" condition="custom:subAspect1">
<forms>
<form>
<field-visibility>
<show id="custom:subAspect1Property1"/>
</field-visibility>
<appearance>
<field id="custom:subAspect1Property1" lable-id="custom-model.subAspect1.subAspect1Property1"/> </appearance>
</form>
</forms>
</config>
Now I have defined such configs for all required subAspects and I can get required fields in the form but when I add some PNG files or others few OOTB aspects are attached automatically. How can I remove those properties? Or how canI configure form in such a way that only custom properties shoul be visible?
Thanks,
Yash