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
Aspects with properties
Aspects
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
Hi,
You can try like this way.(Sorry to say I have not tested).
acme:document- Use your custom type here.
<config evaluator="node-type" condition="acme:document"> <forms> <!-- Default form configuration for the cm:content type --> <form> <field-visibility> <show id="cm:name"/> <show id="cm:title" force="true"/> <show id="cm:description" force="true"/> <show id="mimetype"/> // Basic Metadata </field-visibility> <appearance> ..... </appearance> </form> <!-- Document Library pop-up Edit Metadata form --> <form id="doclib-simple-metadata"> <field-visibility> <show id="cm:name"/> <show id="cm:title" force="true"/> <show id="cm:description" force="true"/> // Basic Metadata </field-visibility> <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl"/> <appearance> ....... </appearance> </form> <!-- Document Library Inline Edit form --> <form id="doclib-inline-edit"> <field-visibility> <show id="cm:name"/> <show id="cm:content" force="true"/> <show id="cm:title" force="true"/> <show id="cm:description" force="true"/> // Basic Metadata </field-visibility> <appearance> .......... </form> </forms> </config> <!-- Create and search forms for acme:document --> <config evaluator="model-type" condition="acme:document"> <forms> <form> <field-visibility> <show id="cm:name"/> <show id="cm:content" force="true"/> <show id="cm:title" force="true"/> <show id="cm:description" force="true"/> <show id="mimetype"/> // Basic Metadata </field-visibility> <appearance> ...... </appearance> </form> </forms> </config>
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.